Skip to content

Commit ed209e1

Browse files
committed
---
yaml --- r: 23239 b: refs/heads/master c: a63f85c h: refs/heads/master i: 23237: 8e64972 23235: 65693b8 23231: f5c7f71 v: v3
1 parent 6ddd5f9 commit ed209e1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6d68658b9a9705d2e4c517d12705a2f64f20e378
2+
refs/heads/master: a63f85ce8c48a819c341f247ef451eb2160b30b1
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/unsafe.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ unsafe fn shared_mutable_state<T: send>(+data: T) -> SharedMutableState<T> {
105105
}
106106
}
107107

108+
#[inline(always)]
108109
unsafe fn get_shared_mutable_state<T: send>(rc: &SharedMutableState<T>)
109110
-> &mut T {
110111
unsafe {
@@ -116,6 +117,7 @@ unsafe fn get_shared_mutable_state<T: send>(rc: &SharedMutableState<T>)
116117
return r;
117118
}
118119
}
120+
#[inline(always)]
119121
unsafe fn get_shared_immutable_state<T: send>(rc: &SharedMutableState<T>)
120122
-> &T {
121123
unsafe {
@@ -169,6 +171,7 @@ class LittleLock {
169171
}
170172

171173
impl LittleLock {
174+
#[inline(always)]
172175
unsafe fn lock<T>(f: fn() -> T) -> T {
173176
class Unlock {
174177
let l: rust_little_lock;
@@ -209,6 +212,7 @@ impl<T: send> Exclusive<T> {
209212
// Currently, scheduling operations (i.e., yielding, receiving on a pipe,
210213
// accessing the provided condition variable) are prohibited while inside
211214
// the exclusive. Supporting that is a work in progress.
215+
#[inline(always)]
212216
unsafe fn with<U>(f: fn(x: &mut T) -> U) -> U {
213217
let rec = unsafe { get_shared_mutable_state(&self.x) };
214218
do rec.lock.lock {

0 commit comments

Comments
 (0)