Move atomically to unstable::sync, and document what it actually does. Close #7872.

This commit is contained in:
Ben Blum
2013-07-30 21:38:44 -04:00
parent 2e6dc161b6
commit bc7cee7bbf
5 changed files with 57 additions and 62 deletions

View File

@@ -105,7 +105,7 @@ mod dl {
use path;
use ptr;
use str;
use task;
use unstable::sync::atomically;
use result::*;
pub unsafe fn open_external(filename: &path::Path) -> *libc::c_void {
@@ -120,7 +120,7 @@ mod dl {
pub fn check_for_errors_in<T>(f: &fn()->T) -> Result<T, ~str> {
unsafe {
do task::atomically {
do atomically {
let _old_error = dlerror();
let result = f();
@@ -164,7 +164,7 @@ mod dl {
use libc;
use path;
use ptr;
use task;
use unstable::sync::atomically;
use result::*;
pub unsafe fn open_external(filename: &path::Path) -> *libc::c_void {
@@ -181,7 +181,7 @@ mod dl {
pub fn check_for_errors_in<T>(f: &fn()->T) -> Result<T, ~str> {
unsafe {
do task::atomically {
do atomically {
SetLastError(0);
let result = f();