Add a way to run the test suite with the new scheduler
TESTARGS=--newrt make check-stage1-rpass Conflicts: src/rt/rustrt.def.in
This commit is contained in:
@@ -882,6 +882,37 @@ rust_get_rt_env() {
|
||||
return task->kernel->env;
|
||||
}
|
||||
|
||||
typedef void *(*nullary_fn)();
|
||||
|
||||
extern "C" CDECL void
|
||||
rust_call_nullary_fn(nullary_fn f) {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
pthread_key_t sched_key;
|
||||
#else
|
||||
DWORD sched_key;
|
||||
#endif
|
||||
|
||||
extern "C" void*
|
||||
rust_get_sched_tls_key() {
|
||||
return &sched_key;
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
rust_initialize_global_state() {
|
||||
|
||||
#ifndef _WIN32
|
||||
assert(!pthread_key_create(&sched_key, NULL));
|
||||
#else
|
||||
sched_key = TlsAlloc();
|
||||
assert(sched_key != TLS_OUT_OF_INDEXES);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Local Variables:
|
||||
// mode: C++
|
||||
|
||||
Reference in New Issue
Block a user