diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-03-27 12:33:31 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-03-27 12:33:31 +0000 |
commit | 165bcc4a0708ff3252fe73156eace36b5980dbf9 (patch) | |
tree | 713cd625a9645d3313a773f696e3ad09df58b93b /src/lib/ch.cpp | |
parent | ef14f74f92fb52d0028eb36b7b48b7e7c4ef52c4 (diff) | |
download | ChibiOS-165bcc4a0708ff3252fe73156eace36b5980dbf9.tar.gz ChibiOS-165bcc4a0708ff3252fe73156eace36b5980dbf9.tar.bz2 ChibiOS-165bcc4a0708ff3252fe73156eace36b5980dbf9.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@249 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/lib/ch.cpp')
-rw-r--r-- | src/lib/ch.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/ch.cpp b/src/lib/ch.cpp index ad4be5f4d..d1e739915 100644 --- a/src/lib/ch.cpp +++ b/src/lib/ch.cpp @@ -70,13 +70,11 @@ namespace chibios_rt { * chibios_rt::BaseThread *
*------------------------------------------------------------------------*/
static msg_t thdstart(void *arg) {
- BaseThread *btp = (BaseThread *)arg;
- return btp->Main();
+ return ((BaseThread *)arg)->Main();
}
BaseThread::BaseThread(tprio_t prio, tmode_t mode, void *workspace, size_t wsize) {
- msg_t thdstart(void *arg);
thread_ref = chThdCreate(prio, mode, workspace, wsize, thdstart, this);
}
@@ -149,7 +147,7 @@ namespace chibios_rt { bool BaseThread::IsPendingMessage(void) {
- return chMsgIsPendingI(thread_ref);
+ return chMsgIsPendingI(currp);
}
#endif /* CH_USE_MESSAGES */
@@ -188,6 +186,13 @@ namespace chibios_rt { chSemSignal(&sem);
}
+
+#ifdef CH_USE_SEMSW
+ msg_t Semaphore::SignalWait(Semaphore *ssem, Semaphore *wsem) {
+
+ return chSemSignalWait(&ssem->sem, &wsem->sem);
+ }
+#endif /* CH_USE_SEMSW */
#endif /* CH_USE_SEMAPHORES */
#ifdef CH_USE_MUTEXES
|