summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2009-11-24 20:26:40 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2009-11-26 17:35:55 +0100
commit060980357df2f71b8d18eb6a86a8c9878a8b417e (patch)
treeed559524cdcf250da89bdd1457d53843908d4352
parent3f8aa3cb035a97988fd38dfb08db5a4224f4b591 (diff)
downloadopenocd+libswd-060980357df2f71b8d18eb6a86a8c9878a8b417e.tar.gz
openocd+libswd-060980357df2f71b8d18eb6a86a8c9878a8b417e.tar.bz2
openocd+libswd-060980357df2f71b8d18eb6a86a8c9878a8b417e.tar.xz
openocd+libswd-060980357df2f71b8d18eb6a86a8c9878a8b417e.zip
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>
-rw-r--r--doc/manual/style.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/manual/style.txt b/doc/manual/style.txt
index b4d02165..71bb5f6b 100644
--- a/doc/manual/style.txt
+++ b/doc/manual/style.txt
@@ -80,6 +80,9 @@ Finally, try to avoid lines of code that are longer than than 72-80 columns:
- designated initializers (@{ .field = value @})
- variables declarations should occur at the point of first use
- 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
- use native types (@c int or @c unsigned) if the type is not important