aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-06 11:46:31 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-06 11:46:31 +0000
commit8ca74ca641b40428107879b934a0ad4337776f37 (patch)
treefeb69c390664163e37205c66288a197c7c1b3c1c /src
parentd121a4942a3144ca52e8148607cc74d1a9c07752 (diff)
downloadChibiOS-8ca74ca641b40428107879b934a0ad4337776f37.tar.gz
ChibiOS-8ca74ca641b40428107879b934a0ad4337776f37.tar.bz2
ChibiOS-8ca74ca641b40428107879b934a0ad4337776f37.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@592 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r--src/chthreads.c3
-rw-r--r--src/templates/chconf.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/chthreads.c b/src/chthreads.c
index 4b61fe964..c41e3af6b 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -34,6 +34,9 @@ Thread *init_thread(Thread *tp, tprio_t prio) {
tp->p_flags = P_MEM_MODE_STATIC;
tp->p_prio = prio;
tp->p_state = PRSUSPENDED;
+#ifdef CH_USE_NESTED_LOCKS
+ tp->p_locks = 0;
+#endif
#ifdef CH_USE_MUTEXES
/* realprio is the thread's own, non-inherited, priority */
tp->p_realprio = prio;
diff --git a/src/templates/chconf.h b/src/templates/chconf.h
index 005748b83..7ce208aa0 100644
--- a/src/templates/chconf.h
+++ b/src/templates/chconf.h
@@ -39,7 +39,7 @@
* @p chSysUnlock() operations is allowed.<br>
* For performance and code size reasons the recommended setting is leave
* this option disabled.<br>
- * You can use this option if you need to merge with ChibiOS/RT external
+ * You can use this option if you need to merge ChibiOS/RT with external
* libraries that require nested lock/unlock operations.
*/
#define CH_USE_NESTED_LOCKS