diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-05 11:45:26 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-05 11:45:26 +0000 |
commit | bb5acac94d079e107f8faa4bb6b2e5d1389c40d4 (patch) | |
tree | 541f2ddb756844458a632eb3dcfb311e28b5fc95 /src/chinit.c | |
parent | 64e5a24e28d6746dc78c1784a474bccf784a272d (diff) | |
download | ChibiOS-bb5acac94d079e107f8faa4bb6b2e5d1389c40d4.tar.gz ChibiOS-bb5acac94d079e107f8faa4bb6b2e5d1389c40d4.tar.bz2 ChibiOS-bb5acac94d079e107f8faa4bb6b2e5d1389c40d4.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@579 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chinit.c')
-rw-r--r-- | src/chinit.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/chinit.c b/src/chinit.c index a675d6910..613e7bfeb 100644 --- a/src/chinit.c +++ b/src/chinit.c @@ -76,4 +76,31 @@ void chSysTimerHandlerI(void) { chVTDoTickI(); } +#if !defined(CH_OPTIMIZE_SPEED) +/** + * Enters the ChibiOS/RT system mutual exclusion zone. + * @note The use of system mutual exclusion zone is not recommended in + * the user code, it is a better idea to use the semaphores or mutexes + * instead. + * @see CH_USE_NESTED_LOCKS + */ +void chSysLock(void) { + + chSysLockInline(); +} + +/** + * Leaves the ChibiOS/RT system mutual exclusion zone. + * @note The use of system mutual exclusion zone is not recommended in + * the user code, it is a better idea to use the semaphores or mutexes + * instead. + * @see CH_USE_NESTED_LOCKS + */ +void chSysUnlock(void) { + + chDbgAssert(currp->p_locks > 0, "chinit.c, chSysUnlock()"); + chSysUnlockInline(); +} +#endif /* !CH_OPTIMIZE_SPEED */ + /** @} */ |