@@ -421,8 +421,6 @@ rust_task::transition(rust_task_list *src, rust_task_list *dst) {
421
421
422
422
void
423
423
rust_task::block (rust_cond *on, const char * name) {
424
- I (thread, !lock.lock_held_by_current_thread ());
425
- scoped_lock with (lock);
426
424
LOG (this , task, " Blocking on 0x%" PRIxPTR " , cond: 0x%" PRIxPTR,
427
425
(uintptr_t ) on, (uintptr_t ) cond);
428
426
A (thread, cond == NULL , " Cannot block an already blocked task." );
@@ -435,8 +433,6 @@ rust_task::block(rust_cond *on, const char* name) {
435
433
436
434
void
437
435
rust_task::wakeup (rust_cond *from) {
438
- I (thread, !lock.lock_held_by_current_thread ());
439
- scoped_lock with (lock);
440
436
A (thread, cond != NULL , " Cannot wake up unblocked task." );
441
437
LOG (this , task, " Blocked on 0x%" PRIxPTR " woken up on 0x%" PRIxPTR,
442
438
(uintptr_t ) cond, (uintptr_t ) from);
@@ -449,8 +445,6 @@ rust_task::wakeup(rust_cond *from) {
449
445
450
446
void
451
447
rust_task::die () {
452
- I (thread, !lock.lock_held_by_current_thread ());
453
- scoped_lock with (lock);
454
448
transition (&thread->running_tasks , &thread->dead_tasks );
455
449
}
456
450
0 commit comments