<分区>
Possible Duplicate:
what does this mean in c int a:16; ?
这里的:1
是什么意思:
...
unsigned respawn:1;
unsigned just_respawn:1;
unsigned detached:1;
unsigned exiting:1;
unsigned exited:1;
} ngx_process_t;
<分区>
Possible Duplicate:
what does this mean in c int a:16; ?
这里的:1
是什么意思:
...
unsigned respawn:1;
unsigned just_respawn:1;
unsigned detached:1;
unsigned exiting:1;
unsigned exited:1;
} ngx_process_t;
最佳答案
这看起来像一个 bit field在 struct
中(您省略的 header )。 :1
表示“1 位宽”,因此在您的情况下,它们都是 bool 值。编译器应该通过按字节打包许多来优化它们的空间使用。
关于c - respawn :1 mean in c? 是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6124149/