diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-24 15:27:45 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2012-07-24 15:28:35 -0400 |
| commit | ae094a7adc8e0f166ea2b137c2940afdb9396bcd (patch) | |
| tree | 49d21e0d95ea214b2d3e161d2afc9a00d473032f /src/rt/rust_builtin.cpp | |
| parent | 9103e439091fbd4e5ec7e561f007172342065340 (diff) | |
| download | rust-ae094a7adc8e0f166ea2b137c2940afdb9396bcd.tar.gz rust-ae094a7adc8e0f166ea2b137c2940afdb9396bcd.zip | |
Add 'do atomically { .. }' for exclusives
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index f86e9232625..784df64d944 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -854,18 +854,26 @@ rust_global_env_chan_ptr() { } extern "C" void -rust_task_inhibit_kill() { - rust_task *task = rust_get_current_task(); +rust_task_inhibit_kill(rust_task *task) { task->inhibit_kill(); } extern "C" void -rust_task_allow_kill() { - rust_task *task = rust_get_current_task(); +rust_task_allow_kill(rust_task *task) { task->allow_kill(); } extern "C" void +rust_task_inhibit_yield(rust_task *task) { + task->inhibit_yield(); +} + +extern "C" void +rust_task_allow_yield(rust_task *task) { + task->allow_yield(); +} + +extern "C" void rust_task_kill_other(rust_task *task) { /* Used for linked failure */ task->kill(); } |
