From 2e69ebf6999102c27c21615b610400a0d922e8c9 Mon Sep 17 00:00:00 2001 From: Agustina Arzille Date: Mon, 4 Apr 2016 19:16:31 -0300 Subject: Lightweight synchronization mechanism * Makefrag.am (libkernel_a_SOURCES): Add kern/gsync.c and kern/gsync.h. * include/mach/gnumach.defs (gsync_wait, gsync_wake, gsync_requeue): New routines. * include/mach/kern_return.h (KERN_TIMEDOUT, KERN_INTERRUPTED): New error codes. * kern/gsync.c: New file. * kern/gsync.h: New file. * kern/startup.c: Include (setup_main): Call gsync_setup. --- kern/startup.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kern/startup.c') diff --git a/kern/startup.c b/kern/startup.c index bd296943..c87cbb10 100644 --- a/kern/startup.c +++ b/kern/startup.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -158,6 +159,8 @@ void setup_main(void) recompute_priorities(NULL); compute_mach_factor(); + gsync_setup (); + /* * Create a kernel thread to start the other kernel * threads. Thread_resume (from kernel_thread) calls -- cgit v1.2.3