equal
deleted
inserted
replaced
17 |
17 |
18 fun inc i = (i := ! i + (1: int); ! i); |
18 fun inc i = (i := ! i + (1: int); ! i); |
19 fun dec i = (i := ! i - (1: int); ! i); |
19 fun dec i = (i := ! i - (1: int); ! i); |
20 |
20 |
21 fun setmp flag value f x = |
21 fun setmp flag value f x = |
22 uninterruptible (fn restore_attributes => fn () => |
22 Multithreading.uninterruptible (fn restore_attributes => fn () => |
23 let |
23 let |
24 val orig_value = ! flag; |
24 val orig_value = ! flag; |
25 val _ = flag := value; |
25 val _ = flag := value; |
26 val result = Exn.capture (restore_attributes f) x; |
26 val result = Exn.capture (restore_attributes f) x; |
27 val _ = flag := orig_value; |
27 val _ = flag := orig_value; |