@@ -231,11 +231,11 @@ void rust_task::start()
231
231
bool
232
232
rust_task::must_fail_from_being_killed () {
233
233
scoped_lock with (lifecycle_lock);
234
- return must_fail_from_being_killed_inner ();
234
+ return must_fail_from_being_killed_unlocked ();
235
235
}
236
236
237
237
bool
238
- rust_task::must_fail_from_being_killed_inner () {
238
+ rust_task::must_fail_from_being_killed_unlocked () {
239
239
lifecycle_lock.must_have_lock ();
240
240
return killed && !reentered_rust_stack && disallow_kill == 0 ;
241
241
}
@@ -275,8 +275,8 @@ rust_task::kill() {
275
275
// Unblock the task so it can unwind.
276
276
277
277
if (state == task_state_blocked &&
278
- must_fail_from_being_killed_inner ()) {
279
- wakeup_inner (cond);
278
+ must_fail_from_being_killed_unlocked ()) {
279
+ wakeup_locked (cond);
280
280
}
281
281
282
282
LOG (this , task, " preparing to unwind task: 0x%" PRIxPTR, this );
@@ -377,10 +377,10 @@ void
377
377
rust_task::transition (rust_task_state src, rust_task_state dst,
378
378
rust_cond *cond, const char * cond_name) {
379
379
scoped_lock with (lifecycle_lock);
380
- transition_inner (src, dst, cond, cond_name);
380
+ transition_locked (src, dst, cond, cond_name);
381
381
}
382
382
383
- void rust_task::transition_inner (rust_task_state src, rust_task_state dst,
383
+ void rust_task::transition_locked (rust_task_state src, rust_task_state dst,
384
384
rust_cond *cond, const char * cond_name) {
385
385
lifecycle_lock.must_have_lock ();
386
386
sched_loop->transition (this , src, dst, cond, cond_name);
@@ -398,12 +398,12 @@ rust_task::set_state(rust_task_state state,
398
398
bool
399
399
rust_task::block (rust_cond *on, const char * name) {
400
400
scoped_lock with (lifecycle_lock);
401
- return block_inner (on, name);
401
+ return block_locked (on, name);
402
402
}
403
403
404
404
bool
405
- rust_task::block_inner (rust_cond *on, const char * name) {
406
- if (must_fail_from_being_killed_inner ()) {
405
+ rust_task::block_locked (rust_cond *on, const char * name) {
406
+ if (must_fail_from_being_killed_unlocked ()) {
407
407
// We're already going to die. Don't block. Tell the task to fail
408
408
return false ;
409
409
}
@@ -413,25 +413,25 @@ rust_task::block_inner(rust_cond *on, const char* name) {
413
413
assert (cond == NULL && " Cannot block an already blocked task." );
414
414
assert (on != NULL && " Cannot block on a NULL object." );
415
415
416
- transition_inner (task_state_running, task_state_blocked, on, name);
416
+ transition_locked (task_state_running, task_state_blocked, on, name);
417
417
418
418
return true ;
419
419
}
420
420
421
421
void
422
422
rust_task::wakeup (rust_cond *from) {
423
423
scoped_lock with (lifecycle_lock);
424
- wakeup_inner (from);
424
+ wakeup_locked (from);
425
425
}
426
426
427
427
void
428
- rust_task::wakeup_inner (rust_cond *from) {
428
+ rust_task::wakeup_locked (rust_cond *from) {
429
429
assert (cond != NULL && " Cannot wake up unblocked task." );
430
430
LOG (this , task, " Blocked on 0x%" PRIxPTR " woken up on 0x%" PRIxPTR,
431
431
(uintptr_t ) cond, (uintptr_t ) from);
432
432
assert (cond == from && " Cannot wake up blocked task on wrong condition." );
433
433
434
- transition_inner (task_state_blocked, task_state_running, NULL , " none" );
434
+ transition_locked (task_state_blocked, task_state_running, NULL , " none" );
435
435
}
436
436
437
437
void
@@ -685,7 +685,7 @@ rust_task::wait_event(bool *killed) {
685
685
scoped_lock with (lifecycle_lock);
686
686
687
687
if (!event_reject) {
688
- block_inner (&event_cond, " waiting on event" );
688
+ block_locked (&event_cond, " waiting on event" );
689
689
lifecycle_lock.unlock ();
690
690
yield (killed);
691
691
lifecycle_lock.lock ();
@@ -702,7 +702,7 @@ rust_task::signal_event(void *event) {
702
702
this ->event = event;
703
703
event_reject = true ;
704
704
if (task_state_blocked == state) {
705
- wakeup_inner (&event_cond);
705
+ wakeup_locked (&event_cond);
706
706
}
707
707
}
708
708
0 commit comments