diff options
| author | Graydon Hoare <[email protected]> | 2010-07-22 15:39:41 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-22 15:39:41 -0700 |
| commit | 7ff20944960c26eee4fb2274afb3c29e5e4367ba (patch) | |
| tree | 725fa28e8ad50451f2d28c8892d6082e971ae9d2 /src/rt | |
| parent | Re-classify some err / bug cases as unimpl. Ideally rustboot should never pro... (diff) | |
| download | rust-7ff20944960c26eee4fb2274afb3c29e5e4367ba.tar.xz rust-7ff20944960c26eee4fb2274afb3c29e5e4367ba.zip | |
Back out too-platform-fussy bits in preempt-test work. I hate this test.
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_internal.h | 11 | ||||
| -rw-r--r-- | src/rt/rust_timer.cpp | 1 | ||||
| -rw-r--r-- | src/rt/rust_upcall.cpp | 3 |
3 files changed, 0 insertions, 15 deletions
diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index 99f52165..d962e894 100644 --- a/src/rt/rust_internal.h +++ b/src/rt/rust_internal.h @@ -67,17 +67,6 @@ struct frame_glue_fns; static size_t const TIME_SLICE_IN_MS = 10; -// This helps our preemption scheme handle "running on valgrind". - -#if defined(__WIN32__) -#define YIELD_C_THREAD_IF_ON_VALGRIND (void); -#else -#define YIELD_C_THREAD_IF_ON_VALGRIND \ - if (RUNNING_ON_VALGRIND) { \ - pthread_yield(); \ - } -#endif - // Every reference counted object should derive from this base class. template <typename T> diff --git a/src/rt/rust_timer.cpp b/src/rt/rust_timer.cpp index 9427ec67..e4fbd6a9 100644 --- a/src/rt/rust_timer.cpp +++ b/src/rt/rust_timer.cpp @@ -34,7 +34,6 @@ timer_loop(void *ptr) { size_t ms = TIME_SLICE_IN_MS; while (!timer->exit_flag) { - YIELD_C_THREAD_IF_ON_VALGRIND; #if defined(__WIN32__) Sleep(ms); #else diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index e931fc9b..ff6874e4 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -1,11 +1,9 @@ #include "rust_internal.h" -#include "valgrind.h" // Upcalls. #ifdef __GNUC__ #define LOG_UPCALL_ENTRY(task) \ - YIELD_C_THREAD_IF_ON_VALGRIND; \ (task)->dom->get_log().reset_indent(0); \ (task)->log(rust_log::UPCALL, \ "> UPCALL %s - task: 0x%" PRIxPTR \ @@ -15,7 +13,6 @@ (task)->dom->get_log().indent(); #else #define LOG_UPCALL_ENTRY(task) \ - YIELD_C_THREAD_IF_ON_VALGRIND; \ (task)->dom->get_log().reset_indent(0); \ (task)->log(rust_log::UPCALL, \ "> UPCALL task: x%" PRIxPTR (task)); \ |