Linux kernel code writes boolean. Is this okay?

Asked 2 years ago, Updated 2 years ago, 127 views

As far as I know, there's a bowl only on C++, and you have to define it on C I saw you write boolean in the Linux kernel code.

Did I get it wrong? TT?

c gcc linux-kernel boolean

2022-09-22 22:20

1 Answers

Bool is not in C89 or C90, but from C99.

The C99 native type is _Bool, which is used to define the standard library macro bowl for <stdbool.h>. _BoolType objects have values of 0 or 1 Include <stdbool.h> to write true and false macros.


2022-09-22 22:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.