aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--demos/ARMCM3-STM32F103-GCC/chconf.h2
-rw-r--r--readme.txt5
-rw-r--r--src/chthreads.c3
-rw-r--r--src/templates/chconf.h2
4 files changed, 9 insertions, 3 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/chconf.h b/demos/ARMCM3-STM32F103-GCC/chconf.h
index e329d0bdd..cc2870abd 100644
--- a/demos/ARMCM3-STM32F103-GCC/chconf.h
+++ b/demos/ARMCM3-STM32F103-GCC/chconf.h
@@ -34,7 +34,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
diff --git a/readme.txt b/readme.txt
index a2b7ace52..9a22b706a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -78,7 +78,10 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
- NEW: Better separation between the port code and the system APIs, now the an
architecture-specific "port driver" contains all the port related code.
Port functions are no more directly exposed as APIs to the user code.
-- NEW: Added an option for nested system locks/unlocks.
+- NEW: Added a configuration option to enable nested system locks/unlocks.
+ The kernel does not need this feature but some external libraries may need
+ it since other RTOSes require this. Enabling this feature increases the
+ memory footprint and decreases the performance, it is off by default.
- NEW: Improved the interrupt handlers related code. Now interrupts are
handled in a very similar way for every architecture. Added macros and
functions that hide the implementation details.
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