mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
rt: Add some more locking asserts to rust_sched_loop
This commit is contained in:
parent
c8dc6fcb4c
commit
2d8ef7387e
@ -44,6 +44,7 @@ rust_sched_loop::rust_sched_loop(rust_scheduler *sched,
|
|||||||
|
|
||||||
void
|
void
|
||||||
rust_sched_loop::activate(rust_task *task) {
|
rust_sched_loop::activate(rust_task *task) {
|
||||||
|
lock.must_have_lock();
|
||||||
task->ctx.next = &c_context;
|
task->ctx.next = &c_context;
|
||||||
DLOG(this, task, "descheduling...");
|
DLOG(this, task, "descheduling...");
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
@ -147,6 +148,7 @@ rust_sched_loop::release_task(rust_task *task) {
|
|||||||
*/
|
*/
|
||||||
rust_task *
|
rust_task *
|
||||||
rust_sched_loop::schedule_task() {
|
rust_sched_loop::schedule_task() {
|
||||||
|
lock.must_have_lock();
|
||||||
I(this, this);
|
I(this, this);
|
||||||
// FIXME: in the face of failing tasks, this is not always right.
|
// FIXME: in the face of failing tasks, this is not always right.
|
||||||
// I(this, n_live_tasks() > 0);
|
// I(this, n_live_tasks() > 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user