diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-11 17:51:37 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-08-11 17:51:37 +0000 |
commit | b9933c2089f5f0cd93738ae9081c45fcf3df54b7 (patch) | |
tree | c98941094d7d03cb42ffc46d258bccc0ffba4ca0 /os/kernel/src/chsys.c | |
parent | 50a41618beccf297631423b10aba8daa3be1e901 (diff) | |
download | ChibiOS-b9933c2089f5f0cd93738ae9081c45fcf3df54b7.tar.gz ChibiOS-b9933c2089f5f0cd93738ae9081c45fcf3df54b7.tar.bz2 ChibiOS-b9933c2089f5f0cd93738ae9081c45fcf3df54b7.zip |
Implemented system state checker debug option, remove the option CH_USE_NESTED_LOCKS. Documentation improvements and fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3221 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chsys.c')
-rw-r--r-- | os/kernel/src/chsys.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index 4c8cd708d..6c63e113f 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -98,6 +98,8 @@ void chSysInit(void) { setcurrp(_thread_init(&mainthread, NORMALPRIO));
currp->p_state = THD_STATE_CURRENT;
#if CH_DBG_ENABLE_STACK_CHECK
+ /* This is a special case because the main thread Thread structure is not
+ adjacent to its stack area.*/
currp->p_stklimit = &__main_thread_stack_base__;
#endif
chSysEnable();
@@ -141,24 +143,4 @@ void chSysTimerHandlerI(void) { #endif
}
-#if CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED
-void chSysLock(void) {
-
- chDbgAssert(currp->p_locks >= 0,
- "chSysLock(), #1",
- "negative nesting counter");
- if (currp->p_locks++ == 0)
- port_lock();
-}
-
-void chSysUnlock(void) {
-
- chDbgAssert(currp->p_locks > 0,
- "chSysUnlock(), #1",
- "non-positive nesting counter");
- if (--currp->p_locks == 0)
- port_unlock();
-}
-#endif /* CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED */
-
/** @} */
|