Tidy up the sync dir, remove dead or mis-designed code in favour of OS primitives, switch rust_kernel to use a lock/signal pair and wait rather than spin.

This commit is contained in:
Graydon Hoare 2010-09-08 19:13:49 -07:00
parent 13d6f87431
commit 616b7afb72
18 changed files with 182 additions and 347 deletions

View file

@ -4,7 +4,6 @@
*/
#include "rust_internal.h"
#include "sync/spin_lock.h"
#include "util/array_list.h"
#include <stdarg.h>
@ -64,7 +63,7 @@ static const char * _foreground_colors[] = { "[37m",
/**
* Synchronizes access to the underlying logging mechanism.
*/
static spin_lock _log_lock;
static lock_and_signal _log_lock;
static uint32_t _last_thread_id;
rust_log::rust_log(rust_srv *srv, rust_dom *dom) :