path: root/sys/compat/cloudabi/cloudabi_util.h
diff options
authorEd Schouten <ed@FreeBSD.org>2016-08-10 21:02:41 +0000
committerEd Schouten <ed@FreeBSD.org>2016-08-10 21:02:41 +0000
commit13b4b4df987d8f05c2cd5813cfe05db953c37c9e (patch)
tree6f1539b3db69da365d8d1ef2df5cbd14c5892af6 /sys/compat/cloudabi/cloudabi_util.h
parent6178f8e8a6ab27d49d4d0c5cbd05be4ca2d140f7 (diff)
Provide the CloudABI vDSO to its executables.
CloudABI executables already provide support for passing in vDSOs. This functionality is used by the emulator for OS X to inject system call handlers. On FreeBSD, we could use it to optimize calls to gettimeofday(), etc. Though I don't have any plans to optimize any system calls right now, let's go ahead and already pass in a vDSO. This will allow us to simplify the executables, as the traditional "syscall" shims can be removed entirely. It also means that we gain more flexibility with regards to adding and removing system calls. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D7438
Notes: svn path=/head/; revision=303941
Diffstat (limited to 'sys/compat/cloudabi/cloudabi_util.h')
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/cloudabi/cloudabi_util.h b/sys/compat/cloudabi/cloudabi_util.h
index c0a02aa88dcb..6eb65aa87b32 100644
--- a/sys/compat/cloudabi/cloudabi_util.h
+++ b/sys/compat/cloudabi/cloudabi_util.h
@@ -33,6 +33,7 @@
#include <contrib/cloudabi/cloudabi_types_common.h>
struct file;
+struct sysentvec;
struct thread;
struct timespec;
@@ -76,4 +77,8 @@ int cloudabi_futex_lock_wrlock(struct thread *, cloudabi_lock_t *,
cloudabi_scope_t, cloudabi_clockid_t, cloudabi_timestamp_t,
+/* vDSO setup and teardown. */
+void cloudabi_vdso_init(struct sysentvec *, char *, char *);
+void cloudabi_vdso_destroy(struct sysentvec *);