diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-11-09 11:43:40 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-11-09 11:43:40 +0000 |
commit | ceb9e5e6e8901f7ba4b31116a7d3da2f4d270b15 (patch) | |
tree | f41ec508409c2708acb6220dec3919f208736443 /os/hal/osal | |
parent | 493cd18458f5f6793986f68f025578a6d92f65b4 (diff) | |
download | ChibiOS-ceb9e5e6e8901f7ba4b31116a7d3da2f4d270b15.tar.gz ChibiOS-ceb9e5e6e8901f7ba4b31116a7d3da2f4d270b15.tar.bz2 ChibiOS-ceb9e5e6e8901f7ba4b31116a7d3da2f4d270b15.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7496 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/osal')
-rw-r--r-- | os/hal/osal/rt/osal.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/os/hal/osal/rt/osal.h b/os/hal/osal/rt/osal.h index 1b5a72d76..004d5f493 100644 --- a/os/hal/osal/rt/osal.h +++ b/os/hal/osal/rt/osal.h @@ -173,7 +173,7 @@ typedef thread_t * thread_reference_t; typedef uint32_t eventflags_t;
#endif
-#if 0
+#if !CH_CFG_USE_EVENTS
/**
* @brief Type of an event flags object.
* @note The content of this structure is not part of the API and should
@@ -743,6 +743,7 @@ static inline void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg) { chThdDequeueAllI(tqp, msg);
}
+#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
/**
* @brief Initializes an event flags object.
*
@@ -754,7 +755,14 @@ static inline void osalEventObjectInit(event_source_t *esp) { chEvtObjectInit(esp);
}
+#else
+static inline void osalEventObjectInit(event_source_t *esp) {
+ esp->flags = 0;
+}
+#endif
+
+#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
/**
* @brief Add flags to an event source object.
*
@@ -768,7 +776,15 @@ static inline void osalEventBroadcastFlagsI(event_source_t *esp, chEvtBroadcastFlagsI(esp, flags);
}
+#else
+static inline void osalEventBroadcastFlagsI(event_source_t *esp,
+ eventflags_t flags) {
+ esp->flags |= flags;
+}
+#endif
+
+#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
/**
* @brief Add flags to an event source object.
*
@@ -782,6 +798,14 @@ static inline void osalEventBroadcastFlags(event_source_t *esp, chEvtBroadcastFlags(esp, flags);
}
+#else
+static inline void osalEventBroadcastFlags(event_source_t *esp,
+ eventflags_t flags) {
+ osalSysLock();
+ esp->flags |= flags;
+ osalSysUnlock();
+}
+#endif
/**
* @brief Initializes s @p mutex_t object.
|