diff options
| author | Patrick Mooney <pmooney@pfmooney.com> | 2018-12-12 22:32:29 +0000 |
|---|---|---|
| committer | Patrick Mooney <pmooney@pfmooney.com> | 2019-07-05 14:52:54 +0000 |
| commit | b69647d3aacd223817db151e369b34ec2471cf28 (patch) | |
| tree | ed6122adde5a23bf83f832c7d3fd99314e3dc287 /usr/src/lib/libvmmapi/common/vmmapi.c | |
| parent | ea9d7b5c804b8f84f0f7f73d8747c06291d0614d (diff) | |
| download | illumos-joyent-b69647d3aacd223817db151e369b34ec2471cf28.tar.gz | |
OS-7447 formalize bhyve resource exclusion
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: John Levon <john.levon@joyent.com>
Diffstat (limited to 'usr/src/lib/libvmmapi/common/vmmapi.c')
| -rw-r--r-- | usr/src/lib/libvmmapi/common/vmmapi.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/src/lib/libvmmapi/common/vmmapi.c b/usr/src/lib/libvmmapi/common/vmmapi.c index 9ef7c2eb20..bae214aba0 100644 --- a/usr/src/lib/libvmmapi/common/vmmapi.c +++ b/usr/src/lib/libvmmapi/common/vmmapi.c @@ -38,7 +38,7 @@ * http://www.illumos.org/license/CDDL. * * Copyright 2015 Pluribus Networks Inc. - * Copyright 2018 Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ #include <sys/cdefs.h> @@ -1786,6 +1786,17 @@ vm_get_device_fd(struct vmctx *ctx) return (ctx->fd); } +#ifndef __FreeBSD__ +int +vm_wrlock_cycle(struct vmctx *ctx) +{ + if (ioctl(ctx->fd, VM_WRLOCK_CYCLE, 0) != 0) { + return (errno); + } + return (0); +} +#endif /* __FreeBSD__ */ + #ifdef __FreeBSD__ const cap_ioctl_t * vm_get_ioctls(size_t *len) |
