Skip to content

Commit 44560bd

Browse files
committed
---
yaml --- r: 6896 b: refs/heads/master c: 854daae h: refs/heads/master v: v3
1 parent 490000c commit 44560bd

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: aeadc6269ef76f4425a49d892ceac7ea311ef5c1
2+
refs/heads/master: 854daaec0c4cf0c236e46b45a1254c85a8b352db

trunk/src/rt/rust_kernel.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,11 @@ rust_kernel::fail() {
150150

151151
rust_task_id
152152
rust_kernel::create_task(rust_task *spawner, const char *name) {
153+
scoped_lock with(_kernel_lock);
153154
rust_scheduler *thread = threads[isaac_rand(&rctx) % num_threads];
154155
rust_task *t = thread->create_task(spawner, name);
155-
{
156-
scoped_lock with(_kernel_lock);
157-
t->user.id = max_id++;
158-
task_table.put(t->user.id, t);
159-
}
156+
t->user.id = max_id++;
157+
task_table.put(t->user.id, t);
160158
return t->user.id;
161159
}
162160

0 commit comments

Comments
 (0)