summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2013-12-13 21:06:52 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-15 21:46:56 +0100
commite1e4d8e34f49463b7d40ca2a2c86ce850d95571c (patch)
tree6779bfe69454b46e1a56198dde9b65197ec2202c /kern
parentf885fde0a7177f954893be22efdf8c55c7c40fdb (diff)
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.
Diffstat (limited to 'kern')
-rw-r--r--kern/sched_prim.c6
1 files changed, 3 insertions, 3 deletions
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 */ \