std::rt: Support os::args

This commit is contained in:
Brian Anderson
2013-06-21 01:28:23 -07:00
parent 7a9a6e4591
commit 1b7c99655f
5 changed files with 176 additions and 11 deletions

View File

@@ -932,6 +932,24 @@ rust_get_num_cpus() {
return get_num_cpus();
}
static lock_and_signal global_args_lock;
static uintptr_t global_args_ptr = 0;
extern "C" CDECL void
rust_take_global_args_lock() {
global_args_lock.lock();
}
extern "C" CDECL void
rust_drop_global_args_lock() {
global_args_lock.unlock();
}
extern "C" CDECL uintptr_t*
rust_get_global_args_ptr() {
return &global_args_ptr;
}
//
// Local Variables:
// mode: C++