summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_event_engine.h
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-03-23 20:16:08 +0000
committerAndrew Clayton <a.clayton@nginx.com>2023-03-28 23:15:28 +0100
commitc1303660eda80c5e17fde06bb8f17715e7be049b (patch)
tree6604e5d93ef42ce3ced9c5cf8d4dc2ee24bd5170 /src/nxt_event_engine.h
parentf20172e5959d2029fdc7f084a332a748563dd50e (diff)
downloadunit-c1303660eda80c5e17fde06bb8f17715e7be049b.tar.gz
unit-c1303660eda80c5e17fde06bb8f17715e7be049b.tar.bz2
Convert uint8_t struct boolean members to nxt_bool_t.
Replace the usage of uint8_t in structures to represent boolean values with our nxt_bool_t type. This will result in no change in structure layout as the nxt_bool_t is now a uint8_t, same as what it's replacing. Even though it's essentially the same type, it makes it much clearer as to what its purpose is. This was largely done with the following script from Alex, with some manual conversions $ grep -rl 'uint8_t.*1 bit' src/ \ | xargs sed -i '/uint8_t.*1 bit/{s/uint8_t /nxt_bool_t /;s/; *\/\*.*/;/}' This doesn't convert the non-uint8_t booleans, they will be handled separately. Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/nxt_event_engine.h')
-rw-r--r--src/nxt_event_engine.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_event_engine.h b/src/nxt_event_engine.h
index 291ea749..8773acee 100644
--- a/src/nxt_event_engine.h
+++ b/src/nxt_event_engine.h
@@ -160,10 +160,10 @@ typedef struct {
nxt_conn_io_t *io;
/* True if an event facility supports file change event notifications. */
- uint8_t file_support; /* 1 bit */
+ nxt_bool_t file_support;
/* True if an event facility supports signal event notifications. */
- uint8_t signal_support; /* 1 bit */
+ nxt_bool_t signal_support;
} nxt_event_interface_t;
@@ -202,7 +202,7 @@ typedef struct {
nxt_uint_t mchanges;
int mevents;
- uint8_t error; /* 1 bit */
+ nxt_bool_t error;
nxt_epoll_change_t *changes;
struct epoll_event *events;
@@ -470,7 +470,7 @@ struct nxt_event_engine_s {
/* The engine ID, the main engine has ID 0. */
uint32_t id;
- uint8_t shutdown; /* 1 bit */
+ nxt_bool_t shutdown;
uint32_t batch;
uint32_t connections;