MEDIUM: task: extend the state field to 32 bits
It's been too short for quite a while now and is now full. It's still
time to extend it to 32-bits since we have room for this without
wasting any space, so we now gained 16 new bits for future flags.
The values were not reassigned just in case there would be a few
hidden u16 or short somewhere in which these flags are placed (as
it used to be the case with stream->pending_events).
The patch is tagged MEDIUM because this required to update the task's
process() prototype to use an int instead of a short, that's quite a
bunch of places.
(cherry picked from commit
144f84a09d48e758396ba17f1ddef41b63f30a72)
Add every other prototypes which use a "unsigned short state".
This patch was cherry-picked in 2.3 in order to shut clang warning:
src/mux_h2.c:4085:49: error: implicit conversion from 'int' to 'unsigned short' changes value from -32769 to 32767 [-Werror,-Wconstant-conversion]
HA_ATOMIC_AND(&h2c->wait_event.tasklet->state, ~TASK_F_USR1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
include/haproxy/atomic.h:270:62: note: expanded from macro 'HA_ATOMIC_AND'
~~~~~~~~~~~~~~~~~~ ^~~~~
Signed-off-by: William Lallemand <wlallemand@haproxy.org>