From e1e4d8e34f49463b7d40ca2a2c86ce850d95571c Mon Sep 17 00:00:00 2001 From: Marin Ramesa Date: Fri, 13 Dec 2013 21:06:52 +0100 Subject: kern/sched_prim.c: avoid casts Avoid the casts by passing the address of the links thread structure member to enqueue_tail(). * kern/sched_prim.c: Avoid casts. --- kern/sched_prim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kern/sched_prim.c') diff --git a/kern/sched_prim.c b/kern/sched_prim.c index c06cd77..ec041fc 100644 --- a/kern/sched_prim.c +++ b/kern/sched_prim.c @@ -245,7 +245,7 @@ void assert_wait( #endif /* MACH_SLOCKS */ simple_lock(lock); thread_lock(thread); - enqueue_tail(q, (queue_entry_t) thread); + enqueue_tail(q, &(thread->links)); thread->wait_event = event; if (interruptible) thread->state |= TH_WAIT; @@ -1196,7 +1196,7 @@ void update_priority( \ simple_lock(&(rq)->lock); /* lock the run queue */ \ checkrq((rq), "thread_setrun: before adding thread"); \ - enqueue_tail(&(rq)->runq[whichq], (queue_entry_t) (th)); \ + enqueue_tail(&(rq)->runq[whichq], &((th)->links)); \ \ if (whichq < (rq)->low || (rq)->count == 0) \ (rq)->low = whichq; /* minimize */ \ @@ -1219,7 +1219,7 @@ void update_priority( } \ \ simple_lock(&(rq)->lock); /* lock the run queue */ \ - enqueue_tail(&(rq)->runq[whichq], (queue_entry_t) (th)); \ + enqueue_tail(&(rq)->runq[whichq], &((th)->links)); \ \ if (whichq < (rq)->low || (rq)->count == 0) \ (rq)->low = whichq; /* minimize */ \ -- cgit v1.2.3