aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/sys.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-07 12:42:29 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-07 12:42:29 +0000
commitb08638d7c8e46b3a207705a2e55fdfe4b78cfb3e (patch)
treef9e60d830d48036b3012822a4eedb909c3c4ce25 /src/include/sys.h
parent37c2720510cf319159d19398533169711d092f6b (diff)
downloadChibiOS-b08638d7c8e46b3a207705a2e55fdfe4b78cfb3e.tar.gz
ChibiOS-b08638d7c8e46b3a207705a2e55fdfe4b78cfb3e.tar.bz2
ChibiOS-b08638d7c8e46b3a207705a2e55fdfe4b78cfb3e.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@735 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/sys.h')
-rw-r--r--src/include/sys.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/include/sys.h b/src/include/sys.h
index f559b5f52..ccc71ae7f 100644
--- a/src/include/sys.h
+++ b/src/include/sys.h
@@ -96,16 +96,16 @@
* a better idea to use the semaphores or mutexes instead.
* @see CH_USE_NESTED_LOCKS
*/
-#if defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
-#if defined(CH_OPTIMIZE_SPEED) || defined(__DOXYGEN__)
+#if CH_USE_NESTED_LOCKS || defined(__DOXYGEN__)
+#if CH_OPTIMIZE_SPEED || defined(__DOXYGEN__)
#define chSysLock() { \
if (currp->p_locks++ == 0) \
- port_lock(); \
+ port_lock(); \
}
-#endif /* defined(CH_OPTIMIZE_SPEED) */
-#else /* !defined(CH_USE_NESTED_LOCKS) */
+#endif /* CH_OPTIMIZE_SPEED */
+#else /* !CH_USE_NESTED_LOCKS */
#define chSysLock() port_lock()
-#endif /* !defined(CH_USE_NESTED_LOCKS) */
+#endif /* !CH_USE_NESTED_LOCKS */
/**
* @brief Leaves the kernel lock mode.
@@ -114,16 +114,16 @@
* a better idea to use the semaphores or mutexes instead.
* @see CH_USE_NESTED_LOCKS
*/
-#if defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
-#if defined(CH_OPTIMIZE_SPEED) || defined(__DOXYGEN__)
+#if CH_USE_NESTED_LOCKS || defined(__DOXYGEN__)
+#if CH_OPTIMIZE_SPEED || defined(__DOXYGEN__)
#define chSysUnlock() { \
if (--currp->p_locks == 0) \
- port_unlock(); \
+ port_unlock(); \
}
-#endif /* defined(CH_OPTIMIZE_SPEED) */
-#else /* !defined(CH_USE_NESTED_LOCKS) */
+#endif /* CH_OPTIMIZE_SPEED */
+#else /* !CH_USE_NESTED_LOCKS */
#define chSysUnlock() port_unlock()
-#endif /* !defined(CH_USE_NESTED_LOCKS) */
+#endif /* !CH_USE_NESTED_LOCKS */
/**
* @brief Enters the kernel lock mode from within an interrupt handler.