git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@742 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2009-02-07 19:14:15 +00:00
parent 4f8cb84a03
commit 330944e658
10 changed files with 39 additions and 39 deletions

View File

@ -86,7 +86,7 @@ namespace chibios_rt {
chThdExit(msg); chThdExit(msg);
} }
#ifdef CH_USE_WAITEXIT #if CH_USE_WAITEXIT
msg_t BaseThread::Wait(void) { msg_t BaseThread::Wait(void) {
return chThdWait(thread_ref); return chThdWait(thread_ref);
@ -103,7 +103,7 @@ namespace chibios_rt {
chThdResume(thread_ref); chThdResume(thread_ref);
} }
#ifdef CH_USE_TERMINATE #if CH_USE_TERMINATE
void BaseThread::Terminate(void) { void BaseThread::Terminate(void) {
chThdTerminate(thread_ref); chThdTerminate(thread_ref);
@ -120,7 +120,7 @@ namespace chibios_rt {
chThdSleepUntil(time); chThdSleepUntil(time);
} }
#ifdef CH_USE_MESSAGES #if CH_USE_MESSAGES
msg_t BaseThread::SendMessage(::Thread* tp, msg_t msg) { msg_t BaseThread::SendMessage(::Thread* tp, msg_t msg) {
return chMsgSend(tp, msg); return chMsgSend(tp, msg);
@ -157,7 +157,7 @@ namespace chibios_rt {
return 0; return 0;
} }
#ifdef CH_USE_SEMAPHORES #if CH_USE_SEMAPHORES
/*------------------------------------------------------------------------* /*------------------------------------------------------------------------*
* chibios_rt::Semaphore * * chibios_rt::Semaphore *
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
@ -176,7 +176,7 @@ namespace chibios_rt {
return chSemWait(&sem); return chSemWait(&sem);
} }
#ifdef CH_USE_SEMAPHORES_TIMEOUT #if CH_USE_SEMAPHORES_TIMEOUT
msg_t Semaphore::WaitTimeout(systime_t time) { msg_t Semaphore::WaitTimeout(systime_t time) {
return chSemWaitTimeout(&sem, time); return chSemWaitTimeout(&sem, time);
@ -188,7 +188,7 @@ namespace chibios_rt {
chSemSignal(&sem); chSemSignal(&sem);
} }
#ifdef CH_USE_SEMSW #if CH_USE_SEMSW
msg_t Semaphore::SignalWait(Semaphore *ssem, Semaphore *wsem) { msg_t Semaphore::SignalWait(Semaphore *ssem, Semaphore *wsem) {
return chSemSignalWait(&ssem->sem, &wsem->sem); return chSemSignalWait(&ssem->sem, &wsem->sem);
@ -196,7 +196,7 @@ namespace chibios_rt {
#endif /* CH_USE_SEMSW */ #endif /* CH_USE_SEMSW */
#endif /* CH_USE_SEMAPHORES */ #endif /* CH_USE_SEMAPHORES */
#ifdef CH_USE_MUTEXES #if CH_USE_MUTEXES
/*------------------------------------------------------------------------* /*------------------------------------------------------------------------*
* chibios_rt::Mutex * * chibios_rt::Mutex *
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
@ -225,7 +225,7 @@ namespace chibios_rt {
chMtxUnlockAll(); chMtxUnlockAll();
} }
#ifdef CH_USE_CONDVARS #if CH_USE_CONDVARS
/*------------------------------------------------------------------------* /*------------------------------------------------------------------------*
* chibios_rt::CondVar * * chibios_rt::CondVar *
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
@ -249,7 +249,7 @@ namespace chibios_rt {
return chCondWait(&condvar); return chCondWait(&condvar);
} }
#ifdef CH_USE_CONDVARS_TIMEOUT #if CH_USE_CONDVARS_TIMEOUT
msg_t CondVar::WaitTimeout(systime_t time) { msg_t CondVar::WaitTimeout(systime_t time) {
return chCondWaitTimeout(&condvar, time); return chCondWaitTimeout(&condvar, time);
@ -258,7 +258,7 @@ namespace chibios_rt {
#endif /* CH_USE_CONDVARS */ #endif /* CH_USE_CONDVARS */
#endif /* CH_USE_MUTEXES */ #endif /* CH_USE_MUTEXES */
#ifdef CH_USE_EVENTS #if CH_USE_EVENTS
/*------------------------------------------------------------------------* /*------------------------------------------------------------------------*
* chibios_rt::Event * * chibios_rt::Event *
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
@ -317,7 +317,7 @@ namespace chibios_rt {
return chEvtWaitAll(ewmask); return chEvtWaitAll(ewmask);
} }
#ifdef CH_USE_EVENTS_TIMEOUT #if CH_USE_EVENTS_TIMEOUT
eventmask_t Event::WaitOneTimeout(eventmask_t ewmask, systime_t time) { eventmask_t Event::WaitOneTimeout(eventmask_t ewmask, systime_t time) {
return chEvtWaitOneTimeout(ewmask, time); return chEvtWaitOneTimeout(ewmask, time);

View File

@ -135,7 +135,7 @@ namespace chibios_rt {
*/ */
static void Exit(msg_t msg); static void Exit(msg_t msg);
#ifdef CH_USE_WAITEXIT #if CH_USE_WAITEXIT
/** /**
* @brief Synchronization on Thread exit. * @brief Synchronization on Thread exit.
* *
@ -179,7 +179,7 @@ namespace chibios_rt {
*/ */
static void SleepUntil(systime_t time); static void SleepUntil(systime_t time);
#ifdef CH_USE_MESSAGES #if CH_USE_MESSAGES
/** /**
* @brief Sends a message to the thread and returns the answer. * @brief Sends a message to the thread and returns the answer.
* *
@ -281,7 +281,7 @@ namespace chibios_rt {
} }
}; };
#ifdef CH_USE_SEMAPHORES #if CH_USE_SEMAPHORES
/** /**
* @brief Class encapsulating a semaphore. * @brief Class encapsulating a semaphore.
*/ */
@ -315,7 +315,7 @@ namespace chibios_rt {
*/ */
msg_t Wait(void); msg_t Wait(void);
#ifdef CH_USE_SEMAPHORES_TIMEOUT #if CH_USE_SEMAPHORES_TIMEOUT
/** /**
* @brief Wait operation on the semaphore with timeout. * @brief Wait operation on the semaphore with timeout.
* *
@ -335,7 +335,7 @@ namespace chibios_rt {
*/ */
void Signal(void); void Signal(void);
#ifdef CH_USE_SEMSW #if CH_USE_SEMSW
/** /**
* @brief Atomic signal and wait operations. * @brief Atomic signal and wait operations.
* *
@ -349,7 +349,7 @@ namespace chibios_rt {
}; };
#endif /* CH_USE_SEMAPHORES */ #endif /* CH_USE_SEMAPHORES */
#ifdef CH_USE_MUTEXES #if CH_USE_MUTEXES
/** /**
* @brief Class encapsulating a mutex. * @brief Class encapsulating a mutex.
*/ */
@ -398,7 +398,7 @@ namespace chibios_rt {
static void UnlockAll(void); static void UnlockAll(void);
}; };
#ifdef CH_USE_CONDVARS #if CH_USE_CONDVARS
/** /**
* @brief Class encapsulating a conditional variable. * @brief Class encapsulating a conditional variable.
*/ */
@ -436,7 +436,7 @@ namespace chibios_rt {
*/ */
msg_t Wait(void); msg_t Wait(void);
#ifdef CH_USE_CONDVARS_TIMEOUT #if CH_USE_CONDVARS_TIMEOUT
/** /**
* @brief Waits on the CondVar while releasing the controlling mutex. * @brief Waits on the CondVar while releasing the controlling mutex.
* *
@ -453,7 +453,7 @@ namespace chibios_rt {
#endif /* CH_USE_CONDVARS */ #endif /* CH_USE_CONDVARS */
#endif /* CH_USE_MUTEXES */ #endif /* CH_USE_MUTEXES */
#ifdef CH_USE_EVENTS #if CH_USE_EVENTS
/** /**
* @brief Class encapsulating an event source. * @brief Class encapsulating an event source.
*/ */
@ -567,7 +567,7 @@ namespace chibios_rt {
*/ */
static eventmask_t WaitAll(eventmask_t ewmask); static eventmask_t WaitAll(eventmask_t ewmask);
#ifdef CH_USE_EVENTS_TIMEOUT #if CH_USE_EVENTS_TIMEOUT
/** /**
* @brief Waits for a single event. * @brief Waits for a single event.
* @details A pending event among those specified in @p ewmask is selected, * @details A pending event among those specified in @p ewmask is selected,

View File

@ -37,35 +37,35 @@
static const struct testcase *tests[] = { static const struct testcase *tests[] = {
&testrdy1, &testrdy1,
&testrdy2, &testrdy2,
#ifdef CH_USE_SEMAPHORES #if CH_USE_SEMAPHORES
&testsem1, &testsem1,
&testsem2, &testsem2,
#endif #endif
#ifdef CH_USE_MUTEXES #if CH_USE_MUTEXES
&testmtx1, &testmtx1,
&testmtx2, &testmtx2,
&testmtx3, &testmtx3,
#ifdef CH_USE_CONDVARS #if CH_USE_CONDVARS
&testcond1, &testcond1,
&testcond2, &testcond2,
#endif #endif
#endif #endif
#ifdef CH_USE_MESSAGES #if CH_USE_MESSAGES
&testmsg1, &testmsg1,
#endif #endif
#ifdef CH_USE_EVENTS #if CH_USE_EVENTS
&testevt1, &testevt1,
#endif #endif
#ifdef CH_USE_HEAP #if CH_USE_HEAP
&testheap1, &testheap1,
#endif #endif
#ifdef CH_USE_MEMPOOLS #if CH_USE_MEMPOOLS
&testpools1, &testpools1,
#endif #endif
#if defined(CH_USE_DYNAMIC) && defined(CH_USE_HEAP) #if CH_USE_DYNAMIC && CH_USE_HEAP
&testdyn1, &testdyn1,
#endif #endif
#if defined(CH_USE_DYNAMIC) && defined(CH_USE_MEMPOOLS) #if CH_USE_DYNAMIC && CH_USE_MEMPOOLS
&testdyn2, &testdyn2,
#endif #endif
&testbmk1, &testbmk1,

View File

@ -21,7 +21,7 @@
#include "test.h" #include "test.h"
#if defined(CH_USE_CONDVARS) && defined(CH_USE_MUTEXES) #if CH_USE_CONDVARS && CH_USE_MUTEXES
static Mutex m1; static Mutex m1;
static CondVar c1; static CondVar c1;

View File

@ -21,7 +21,7 @@
#include "test.h" #include "test.h"
#ifdef CH_USE_DYNAMIC #if CH_USE_DYNAMIC
static msg_t thread(void *p) { static msg_t thread(void *p) {
@ -29,7 +29,7 @@ static msg_t thread(void *p) {
return 0; return 0;
} }
#ifdef CH_USE_HEAP #if CH_USE_HEAP
static char *dyn1_gettest(void) { static char *dyn1_gettest(void) {
return "Dynamic APIs, threads creation from heap"; return "Dynamic APIs, threads creation from heap";
@ -78,7 +78,7 @@ const struct testcase testdyn1 = {
}; };
#endif /* CH_USE_HEAP */ #endif /* CH_USE_HEAP */
#ifdef CH_USE_MEMPOOLS #if CH_USE_MEMPOOLS
static MemoryPool mp1; static MemoryPool mp1;
static char *dyn2_gettest(void) { static char *dyn2_gettest(void) {

View File

@ -21,7 +21,7 @@
#include "test.h" #include "test.h"
#ifdef CH_USE_EVENTS #if CH_USE_EVENTS
#define ALLOWED_DELAY MS2ST(5) #define ALLOWED_DELAY MS2ST(5)

View File

@ -21,7 +21,7 @@
#include "test.h" #include "test.h"
#ifdef CH_USE_HEAP #if CH_USE_HEAP
#define SIZE 16 #define SIZE 16

View File

@ -21,7 +21,7 @@
#include "test.h" #include "test.h"
#ifdef CH_USE_MUTEXES #if CH_USE_MUTEXES
#define ALLOWED_DELAY 5 #define ALLOWED_DELAY 5

View File

@ -21,7 +21,7 @@
#include "test.h" #include "test.h"
#ifdef CH_USE_MEMPOOLS #if CH_USE_MEMPOOLS
static MemoryPool mp1; static MemoryPool mp1;

View File

@ -21,7 +21,7 @@
#include "test.h" #include "test.h"
#ifdef CH_USE_SEMAPHORES #if CH_USE_SEMAPHORES
#define ALLOWED_DELAY MS2ST(5) #define ALLOWED_DELAY MS2ST(5)