summaryrefslogtreecommitdiff
path: root/kern/ipc_sched.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-09-30 09:08:44 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-02-20 18:46:55 +0100
commit739421ac52472d8dd2f23c141d449ff112fbf9b6 (patch)
tree43ae3d1931109f43c4532b9ead5554822bc21d6e /kern/ipc_sched.c
parentb0fa32c1d7de74a8b83b33833640ff30c84e9fbd (diff)
kern: reduce the size of `struct thread'
Reduce the size of `struct thread' by twelve bytes making it fit into exactly five cache lines (on 32-bit platforms). * kern/thread.h (struct thread): Group the state and all flags in a bitfield. (TH_EV_WAKE_ACTIVE, TH_EV_STATE): Provide macros that generate keys for synchronization primitives like `thread_wakeup'. * kern/thread.c (thread_halt, thread_dowait, thread_suspend): Use the new keys instead of addresses of fields for the synchronisation. * kern/ipc_sched.c (thread_handoff): Likewise. * kern/sched_prim.c (thread_invoke, thread_dispatch): Likewise.
Diffstat (limited to 'kern/ipc_sched.c')
-rw-r--r--kern/ipc_sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/ipc_sched.c b/kern/ipc_sched.c
index cc1672d..be82971 100644
--- a/kern/ipc_sched.c
+++ b/kern/ipc_sched.c
@@ -268,7 +268,7 @@ thread_handoff(
*/
old->wake_active = FALSE;
thread_unlock(old);
- thread_wakeup((event_t)&old->wake_active);
+ thread_wakeup(TH_EV_WAKE_ACTIVE(old));
goto after_old_thread;
}
} else