aboutsummaryrefslogtreecommitdiff
path: root/kern/startup.c
diff options
context:
space:
mode:
authorAgustina Arzille <avarzille@riseup.net>2016-04-04 19:16:31 -0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-04-15 18:17:59 +0200
commit2e69ebf6999102c27c21615b610400a0d922e8c9 (patch)
treef74126f2e1b0902bf866400940b19ddb932b1d6f /kern/startup.c
parent962d56bd3720f10e38ee48df8654c5a6d413a394 (diff)
downloadgnumach-2e69ebf6999102c27c21615b610400a0d922e8c9.tar.gz
gnumach-2e69ebf6999102c27c21615b610400a0d922e8c9.tar.bz2
gnumach-2e69ebf6999102c27c21615b610400a0d922e8c9.zip
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 <kern/gsync.h> (setup_main): Call gsync_setup.
Diffstat (limited to 'kern/startup.c')
-rw-r--r--kern/startup.c3
1 files changed, 3 insertions, 0 deletions
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 <ipc/ipc_init.h>
#include <kern/cpu_number.h>
#include <kern/debug.h>
+#include <kern/gsync.h>
#include <kern/machine.h>
#include <kern/mach_factor.h>
#include <kern/mach_clock.h>
@@ -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