diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-09-30 09:08:44 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-02-20 18:46:55 +0100 |
commit | 739421ac52472d8dd2f23c141d449ff112fbf9b6 (patch) | |
tree | 43ae3d1931109f43c4532b9ead5554822bc21d6e /COPYING | |
parent | b0fa32c1d7de74a8b83b33833640ff30c84e9fbd (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 'COPYING')
0 files changed, 0 insertions, 0 deletions