rt: Remove sync::yield and sync::sleep

This commit is contained in:
Brian Anderson 2012-02-09 14:29:55 -08:00
parent 421c8db144
commit 5d8d591ffc
3 changed files with 0 additions and 23 deletions

View File

@ -35,7 +35,6 @@ define DEF_RUNTIME_TARGETS
RUNTIME_CS_$(1) := \
rt/sync/timer.cpp \
rt/sync/sync.cpp \
rt/sync/lock_and_signal.cpp \
rt/sync/rust_thread.cpp \
rt/rust.cpp \

View File

@ -1,20 +0,0 @@
#include "../globals.h"
#include "sync.h"
void sync::yield() {
#ifdef __APPLE__
pthread_yield_np();
#elif __WIN32__
Sleep(1);
#else
pthread_yield();
#endif
}
void sync::sleep(size_t timeout_in_ms) {
#ifdef __WIN32__
Sleep(timeout_in_ms);
#else
usleep(timeout_in_ms * 1000);
#endif
}

View File

@ -4,8 +4,6 @@
class sync {
public:
static void yield();
static void sleep(size_t timeout_in_ms);
template <class T>
static bool compare_and_swap(T *address,
T oldValue, T newValue) {