diff options
Diffstat (limited to 'os/kernel/src')
-rw-r--r-- | os/kernel/src/chcond.c | 2 | ||||
-rw-r--r-- | os/kernel/src/chheap.c | 12 | ||||
-rw-r--r-- | os/kernel/src/chmboxes.c | 6 | ||||
-rw-r--r-- | os/kernel/src/chmempools.c | 2 | ||||
-rw-r--r-- | os/kernel/src/chmtx.c | 20 | ||||
-rw-r--r-- | os/kernel/src/chqueues.c | 4 | ||||
-rw-r--r-- | os/kernel/src/chschd.c | 4 | ||||
-rw-r--r-- | os/kernel/src/chsem.c | 2 | ||||
-rw-r--r-- | os/kernel/src/chsys.c | 2 | ||||
-rw-r--r-- | os/kernel/src/chthreads.c | 4 |
10 files changed, 29 insertions, 29 deletions
diff --git a/os/kernel/src/chcond.c b/os/kernel/src/chcond.c index 6b718c7f9..d4d845512 100644 --- a/os/kernel/src/chcond.c +++ b/os/kernel/src/chcond.c @@ -73,7 +73,7 @@ *
* @init
*/
-void chCondInit(condition_variable_t *cp) {
+void chCondObjectInit(condition_variable_t *cp) {
chDbgCheck(cp != NULL, "chCondInit");
diff --git a/os/kernel/src/chheap.c b/os/kernel/src/chheap.c index 4f20d3920..b41817123 100644 --- a/os/kernel/src/chheap.c +++ b/os/kernel/src/chheap.c @@ -88,9 +88,9 @@ void _heap_init(void) { default_heap.h_free.h.u.next = (union heap_header *)NULL;
default_heap.h_free.h.size = 0;
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
- chMtxInit(&default_heap.h_mtx);
+ chMtxObjectInit(&default_heap.h_mtx);
#else
- chSemInit(&default_heap.h_sem, 1);
+ chSemObjectInit(&default_heap.h_sem, 1);
#endif
}
@@ -105,7 +105,7 @@ void _heap_init(void) { *
* @init
*/
-void chHeapInit(memory_heap_t *heapp, void *buf, size_t size) {
+void chHeapObjectInit(memory_heap_t *heapp, void *buf, size_t size) {
union heap_header *hp;
chDbgCheck(MEM_IS_ALIGNED(buf) && MEM_IS_ALIGNED(size), "chHeapInit");
@@ -116,9 +116,9 @@ void chHeapInit(memory_heap_t *heapp, void *buf, size_t size) { hp->h.u.next = NULL;
hp->h.size = size - sizeof(union heap_header);
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
- chMtxInit(&heapp->h_mtx);
+ chMtxObjectInit(&heapp->h_mtx);
#else
- chSemInit(&heapp->h_sem, 1);
+ chSemObjectInit(&heapp->h_sem, 1);
#endif
}
@@ -211,7 +211,7 @@ void chHeapFree(void *p) { qp = &heapp->h_free;
H_LOCK(heapp);
- while (TRUE) {
+ while (true) {
chDbgAssert((hp < qp) || (hp >= LIMIT(qp)),
"chHeapFree(), #1",
"within free block");
diff --git a/os/kernel/src/chmboxes.c b/os/kernel/src/chmboxes.c index 16f303daf..b1a4fb963 100644 --- a/os/kernel/src/chmboxes.c +++ b/os/kernel/src/chmboxes.c @@ -84,14 +84,14 @@ *
* @init
*/
-void chMBInit(mailbox_t *mbp, msg_t *buf, cnt_t n) {
+void chMBObjectInit(mailbox_t *mbp, msg_t *buf, cnt_t n) {
chDbgCheck((mbp != NULL) && (buf != NULL) && (n > 0), "chMBInit");
mbp->mb_buffer = mbp->mb_wrptr = mbp->mb_rdptr = buf;
mbp->mb_top = &buf[n];
- chSemInit(&mbp->mb_emptysem, n);
- chSemInit(&mbp->mb_fullsem, 0);
+ chSemObjectInit(&mbp->mb_emptysem, n);
+ chSemObjectInit(&mbp->mb_fullsem, 0);
}
/**
diff --git a/os/kernel/src/chmempools.c b/os/kernel/src/chmempools.c index b52f0b6d9..44557235b 100644 --- a/os/kernel/src/chmempools.c +++ b/os/kernel/src/chmempools.c @@ -73,7 +73,7 @@ *
* @init
*/
-void chPoolInit(memory_pool_t *mp, size_t size, memgetfunc_t provider) {
+void chPoolObjectInit(memory_pool_t *mp, size_t size, memgetfunc_t provider) {
chDbgCheck((mp != NULL) && (size >= sizeof(void *)), "chPoolInit");
diff --git a/os/kernel/src/chmtx.c b/os/kernel/src/chmtx.c index 84e868a3f..ec191b53d 100644 --- a/os/kernel/src/chmtx.c +++ b/os/kernel/src/chmtx.c @@ -96,7 +96,7 @@ *
* @init
*/
-void chMtxInit(mutex_t *mp) {
+void chMtxObjectInit(mutex_t *mp) {
chDbgCheck(mp != NULL, "chMtxInit");
@@ -217,13 +217,13 @@ void chMtxLockS(mutex_t *mp) { *
* @param[in] mp pointer to the @p mutex_t structure
* @return The operation status.
- * @retval TRUE if the mutex has been successfully acquired
- * @retval FALSE if the lock attempt failed.
+ * @retval true if the mutex has been successfully acquired
+ * @retval false if the lock attempt failed.
*
* @api
*/
-bool_t chMtxTryLock(mutex_t *mp) {
- bool_t b;
+bool chMtxTryLock(mutex_t *mp) {
+ bool b;
chSysLock();
@@ -245,23 +245,23 @@ bool_t chMtxTryLock(mutex_t *mp) { *
* @param[in] mp pointer to the @p mutex_t structure
* @return The operation status.
- * @retval TRUE if the mutex has been successfully acquired
- * @retval FALSE if the lock attempt failed.
+ * @retval true if the mutex has been successfully acquired
+ * @retval false if the lock attempt failed.
*
* @sclass
*/
-bool_t chMtxTryLockS(mutex_t *mp) {
+bool chMtxTryLockS(mutex_t *mp) {
chDbgCheckClassS();
chDbgCheck(mp != NULL, "chMtxTryLockS");
if (mp->m_owner != NULL)
- return FALSE;
+ return false;
mp->m_owner = currp;
mp->m_next = currp->p_mtxlist;
currp->p_mtxlist = mp;
- return TRUE;
+ return true;
}
/**
diff --git a/os/kernel/src/chqueues.c b/os/kernel/src/chqueues.c index a4b0aa416..7115d77b6 100644 --- a/os/kernel/src/chqueues.c +++ b/os/kernel/src/chqueues.c @@ -224,7 +224,7 @@ size_t chIQReadTimeout(InputQueue *iqp, uint8_t *bp, chDbgCheck(n > 0, "chIQReadTimeout");
chSysLock();
- while (TRUE) {
+ while (true) {
if (nfy)
nfy(iqp);
@@ -404,7 +404,7 @@ size_t chOQWriteTimeout(OutputQueue *oqp, const uint8_t *bp, chDbgCheck(n > 0, "chOQWriteTimeout");
chSysLock();
- while (TRUE) {
+ while (true) {
while (chOQIsFullI(oqp)) {
if (qwait((GenericQueue *)oqp, time) != Q_OK) {
chSysUnlock();
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c index b99afbbb9..4592f4806 100644 --- a/os/kernel/src/chschd.c +++ b/os/kernel/src/chschd.c @@ -267,9 +267,9 @@ void chSchRescheduleS(void) { * @note Not a user function, it is meant to be invoked by the scheduler
* itself or from within the port layer.
*
- * @retval TRUE if there is a thread that must go in running state
+ * @retval true if there is a thread that must go in running state
* immediately.
- * @retval FALSE if preemption is not required.
+ * @retval false if preemption is not required.
*
* @special
*/
diff --git a/os/kernel/src/chsem.c b/os/kernel/src/chsem.c index 8ddba8523..554c02246 100644 --- a/os/kernel/src/chsem.c +++ b/os/kernel/src/chsem.c @@ -96,7 +96,7 @@ *
* @init
*/
-void chSemInit(semaphore_t *sp, cnt_t n) {
+void chSemObjectInit(semaphore_t *sp, cnt_t n) {
chDbgCheck((sp != NULL) && (n >= 0), "chSemInit");
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index 578de3ccf..b3d99a7d9 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -73,7 +73,7 @@ static void _idle_thread(void *p) { (void)p;
chRegSetThreadName("idle");
- while (TRUE) {
+ while (true) {
port_wait_for_interrupt();
IDLE_LOOP_HOOK();
}
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c index bc161ba52..47f53e10d 100644 --- a/os/kernel/src/chthreads.c +++ b/os/kernel/src/chthreads.c @@ -280,7 +280,7 @@ thread_t *chThdResume(thread_t *tp) { * @brief Requests a thread termination.
* @pre The target thread must be written to invoke periodically
* @p chThdShouldTerminate() and terminate cleanly if it returns
- * @p TRUE.
+ * @p true.
* @post The specified thread will terminate after detecting the termination
* condition.
*
@@ -400,7 +400,7 @@ void chThdExitS(msg_t msg) { #endif
chSchGoSleepS(THD_STATE_FINAL);
/* The thread never returns here.*/
- chDbgAssert(FALSE, "chThdExitS(), #1", "zombies apocalypse");
+ chDbgAssert(false, "chThdExitS(), #1", "zombies apocalypse");
}
#if CH_USE_WAITEXIT || defined(__DOXYGEN__)
|