aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-01-02 08:32:03 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-01-02 08:32:03 +0000
commit462ab6bcaffc7ee98c418f17abab1178beb83db1 (patch)
tree349ea57c2b534beed4ee986256a866f00d6407f4
parent12286fd5e4031be7d2eb9529f52a7c6ebd1d001f (diff)
downloadChibiOS-462ab6bcaffc7ee98c418f17abab1178beb83db1.tar.gz
ChibiOS-462ab6bcaffc7ee98c418f17abab1178beb83db1.tar.bz2
ChibiOS-462ab6bcaffc7ee98c418f17abab1178beb83db1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5010 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/various/ch.cpp5
-rw-r--r--os/various/ch.hpp28
2 files changed, 29 insertions, 4 deletions
diff --git a/os/various/ch.cpp b/os/various/ch.cpp
index 3bd3d6234..84678349c 100644
--- a/os/various/ch.cpp
+++ b/os/various/ch.cpp
@@ -347,6 +347,11 @@ namespace chibios_rt {
chEvtBroadcastFlags(&event, flags);
}
+ void Event::broadcastFlagsI(flagsmask_t flags) {
+
+ chEvtBroadcastFlagsI(&event, flags);
+ }
+
flagsmask_t Event::getAndClearFlags(EventListener *elp) {
return chEvtGetAndClearFlags(elp);
diff --git a/os/various/ch.hpp b/os/various/ch.hpp
index 8ede5cac2..ad3dd18af 100644
--- a/os/various/ch.hpp
+++ b/os/various/ch.hpp
@@ -147,7 +147,9 @@ namespace chibios_rt {
*
* @api
*/
- ThreadReference(Thread * tp);
+ ThreadReference(Thread * tp) : thread_ref(tp) {
+
+ };
/**
* @brief Suspends the current thread on the reference.
@@ -238,7 +240,7 @@ namespace chibios_rt {
* @brief Abstract base class for a ChibiOS/RT thread.
* @details The thread body is the virtual function @p Main().
*/
- class BaseThread : ThreadReference{
+ class BaseThread : public ThreadReference {
public:
/**
@@ -255,7 +257,9 @@ namespace chibios_rt {
*
* @api
*/
- virtual msg_t Main(void);
+ virtual msg_t Main(void) {
+ return 0;
+ };
/**
* @brief Creates and starts a system thread.
@@ -268,7 +272,11 @@ namespace chibios_rt {
*
* @api
*/
- virtual bool start(const char *tname, tprio_t prio);
+ virtual bool start(const char *tname, tprio_t prio){
+ (void) tname;
+ (void) prio;
+ return false;
+ };
/**
* @brief Thread exit.
@@ -409,6 +417,7 @@ namespace chibios_rt {
* @api
*/
bool start(const char *tname, tprio_t prio) {
+ (void)tname;
msg_t _thd_start(void *arg);
thread_ref = chThdCreateStatic(wa, sizeof(wa), prio, _thd_start, this);
@@ -690,6 +699,17 @@ namespace chibios_rt {
void broadcastFlags(flagsmask_t flags);
/**
+ * @brief Broadcasts an event.
+ * @details All the listeners registered on the event source are signaled.
+ *
+ * @param[in] flags the flags set to be added to the listener
+ * flags mask
+ *
+ * @api
+ */
+ void broadcastFlagsI(flagsmask_t flags);
+
+ /**
* @brief Clears specified events from the pending events mask.
*
* @param[in] elp pointer to the @p EventListener structure