Rtos API example
ns_types.h File Reference
Basic compiler and type setup. More...
Go to the source code of this file.
Data Structures | |
struct | ns_iovec |
Scatter-gather descriptor. More... | |
Typedefs | |
typedef struct ns_iovec | ns_iovec_t |
Scatter-gather descriptor. |
Detailed Description
Basic compiler and type setup.
We currently assume C99 or later.
C99 features being relied on:
- <inttypes.h> and <stdbool.h>
- inline (with C99 semantics, not C++ as per default GCC);
- designated initialisers;
- compound literals;
- restrict;
- [static N] in array parameters;
- declarations in for statements;
- mixing declarations and statements
Compilers should be set to C99 or later mode when building Nanomesh source. For GCC this means "-std=gnu99" (C99 with usual GNU extensions).
Also, a little extra care is required for public header files that could be included from C++, especially as C++ lacks some C99 features.
(TODO: as this is exposed to API users, do we need a predefine to distinguish internal and external use, for finer control? Not yet, but maybe...)
Definition in file ns_types.h.
Typedef Documentation
typedef struct ns_iovec ns_iovec_t |
Scatter-gather descriptor.
Slightly optimised for small platforms - we assume we won't need any element bigger than 64K.
Generated on Sun Jul 17 2022 08:25:35 by 1.7.2