From deb2b637605bf0beedb55ed5483f55af09ab41e9 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 12 Aug 2023 13:30:47 +0200 Subject: sched: Add runq_lock helpers which check they are called at spl7 --- kern/eventcount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/eventcount.c') diff --git a/kern/eventcount.c b/kern/eventcount.c index 3a96b4fb..4dda5186 100644 --- a/kern/eventcount.c +++ b/kern/eventcount.c @@ -339,7 +339,7 @@ simpler_thread_setrun( ast_on(cpu_number(), AST_BLOCK); whichq = (th)->sched_pri; - simple_lock(&(rq)->lock); /* lock the run queue */ + runq_lock(rq); /* lock the run queue */ enqueue_head(&(rq)->runq[whichq], &((th)->links)); if (whichq < (rq)->low || (rq)->count == 0) @@ -350,7 +350,7 @@ simpler_thread_setrun( #else (th)->runq = (rq); #endif - simple_unlock(&(rq)->lock); + runq_unlock(rq); /* * Turn off first_quantum to allow context switch. -- cgit v1.2.3