styleguide: add some embedded style rules.

Embedded and pthreads rely on modest and predictable
stack usage.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
Øyvind Harboe 2009-11-24 20:26:40 +01:00
parent 3f8aa3cb03
commit 060980357d
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,9 @@ Finally, try to avoid lines of code that are longer than than 72-80 columns:
- designated initializers (@{ .field = value @}) - designated initializers (@{ .field = value @})
- variables declarations should occur at the point of first use - variables declarations should occur at the point of first use
- new block scopes for selection and iteration statements - new block scopes for selection and iteration statements
- use malloc() to create dynamic arrays. Do @b not use @c alloca
or variable length arrays on the stack. non-MMU hosts(uClinux) and
pthreads require modest and predictable stack usage.
@section styletypes Type Guidelines @section styletypes Type Guidelines
- use native types (@c int or @c unsigned) if the type is not important - use native types (@c int or @c unsigned) if the type is not important