Back out too-platform-fussy bits in preempt-test work. I hate this test.
This commit is contained in:
parent
1cb4a57b7b
commit
7ff2094496
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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)); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user