sched/deadline: Use C bitfields for the state flags
authorluca abeni <luca.abeni@santannapisa.it>
Thu, 7 Sep 2017 10:09:31 +0000 (12:09 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Oct 2017 09:45:26 +0000 (11:45 +0200)
commit799ba82de01e7543f6b2042e1a739f3a20255f23
treeb28040f9a227eb73af78a698dda7a83defdd2068
parent8c0944cee7af55291df0b28e6e2eeac0930e93c9
sched/deadline: Use C bitfields for the state flags

Ask the compiler to use a single bit for storing true / false values,
instead of wasting the size of a whole int value.
Tested with gcc 5.4.0 on x86_64, and the compiler produces the expected
Assembly (similar to the Assembly code generated when explicitly accessing
the bits with bitmasks, "&" and "|").

Signed-off-by: luca abeni <luca.abeni@santannapisa.it>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Juri Lelli <juri.lelli@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1504778971-13573-5-git-send-email-luca.abeni@santannapisa.it
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h