[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/4] kern/sched_prim.c: avoid casts
From: |
Marin Ramesa |
Subject: |
[PATCH 1/4] kern/sched_prim.c: avoid casts |
Date: |
Fri, 13 Dec 2013 21:06:52 +0100 |
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(-)
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 */ \
--
1.8.1.4
- [PATCH 1/4] kern/sched_prim.c: avoid casts,
Marin Ramesa <=