diff --git a/sched/env_findvar.c b/sched/env_findvar.c index 2ed10aede41..b789a101d0a 100644 --- a/sched/env_findvar.c +++ b/sched/env_findvar.c @@ -41,6 +41,7 @@ #ifndef CONFIG_DISABLE_ENVIRON +#include #include #include @@ -56,7 +57,7 @@ * Function: env_cmpname ****************************************************************************/ -static boolean env_cmpname(const char *pszname, const char *peqname) +static bool env_cmpname(const char *pszname, const char *peqname) { /* Search until we find anything different in the two names */ @@ -66,9 +67,9 @@ static boolean env_cmpname(const char *pszname, const char *peqname) if ( *pszname == '\0' && *peqname == '=' ) { - return TRUE; + return true; } - return FALSE; + return false; } /**************************************************************************** diff --git a/sched/mq_internal.h b/sched/mq_internal.h index 6a40144d401..e362ec2fbd4 100644 --- a/sched/mq_internal.h +++ b/sched/mq_internal.h @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -114,7 +115,7 @@ struct msgq_s int16_t nwaitnotfull; /* Number tasks waiting for not full */ int16_t nwaitnotempty; /* Number tasks waiting for not empty */ uint8_t maxmsgsize; /* Max size of message in message queue */ - boolean unlinked; /* TRUE if the msg queue has been unlinked */ + bool unlinked; /* true if the msg queue has been unlinked */ #ifndef CONFIG_DISABLE_SIGNALS FAR struct mq_des *ntmqdes; /* Notification: Owning mqdes (NULL if none) */ pid_t ntpid; /* Notification: Receiving Task's PID */ diff --git a/sched/mq_receive.c b/sched/mq_receive.c index cd7748c3f37..aff9e3be88f 100644 --- a/sched/mq_receive.c +++ b/sched/mq_receive.c @@ -38,15 +38,18 @@ ************************************************************************/ #include + #include +#include #include #include #include #include + #include "mq_internal.h" /************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************/ /************************************************************************ @@ -119,7 +122,7 @@ ssize_t mq_receive(mqd_t mqdes, void *msg, size_t msglen, int *prio) irqstate_t saved_state; ssize_t ret = ERROR; - DEBUGASSERT(up_interrupt_context() == FALSE); + DEBUGASSERT(up_interrupt_context() == false); /* Verify the input parameters and, in case of an error, set * errno appropriately. diff --git a/sched/mq_timedreceive.c b/sched/mq_timedreceive.c index a13a8a632e7..1100331eb85 100644 --- a/sched/mq_timedreceive.c +++ b/sched/mq_timedreceive.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -53,7 +54,7 @@ #include "mq_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -196,7 +197,7 @@ ssize_t mq_timedreceive(mqd_t mqdes, void *msg, size_t msglen, irqstate_t saved_state; int ret = ERROR; - DEBUGASSERT(up_interrupt_context() == FALSE); + DEBUGASSERT(up_interrupt_context() == false); /* Verify the input parameters and, in case of an error, set * errno appropriately. diff --git a/sched/mq_timedsend.c b/sched/mq_timedsend.c index 7bdbbb7e1da..412d2b8b471 100644 --- a/sched/mq_timedsend.c +++ b/sched/mq_timedsend.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -53,7 +54,7 @@ #include "mq_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -192,7 +193,7 @@ int mq_timedsend(mqd_t mqdes, const char *msg, size_t msglen, int prio, irqstate_t saved_state; int ret = ERROR; - DEBUGASSERT(up_interrupt_context() == FALSE); + DEBUGASSERT(up_interrupt_context() == false); /* Verify the input parameters -- setting errno appropriately * on any failures to verify. diff --git a/sched/mq_unlink.c b/sched/mq_unlink.c index 7d77e266d67..0f1e63e4884 100644 --- a/sched/mq_unlink.c +++ b/sched/mq_unlink.c @@ -39,13 +39,15 @@ #include +#include #include #include + #include "os_internal.h" #include "mq_internal.h" /************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************/ /************************************************************************ @@ -131,7 +133,7 @@ int mq_unlink(const char *mq_name) else { - msgq->unlinked = TRUE; + msgq->unlinked = true; } ret = OK; diff --git a/sched/os_internal.h b/sched/os_internal.h index cda7dc61ceb..d37000b6a53 100644 --- a/sched/os_internal.h +++ b/sched/os_internal.h @@ -41,13 +41,15 @@ ****************************************************************************/ #include + #include +#include #include #include #include /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /* OS CRASH CODES */ @@ -136,7 +138,7 @@ typedef struct pidhash_s pidhash_t; struct tasklist_s { DSEG volatile dq_queue_t *list; /* Pointer to the task list */ - boolean prioritized; /* TRUE if the list is prioritized */ + bool prioritized; /* true if the list is prioritized */ }; typedef struct tasklist_s tasklist_t; @@ -240,41 +242,39 @@ extern const tasklist_t g_tasklisttable[NUM_TASK_STATES]; * Public Function Prototypes ****************************************************************************/ -extern void task_start(void); -extern int task_schedsetup(FAR _TCB *tcb, int priority, - start_t start, main_t main); -extern int task_argsetup(FAR _TCB *tcb, const char *name, - const char *argv[]); -extern int task_deletecurrent(void); +extern void task_start(void); +extern int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, + main_t main); +extern int task_argsetup(FAR _TCB *tcb, const char *name, const char *argv[]); +extern int task_deletecurrent(void); -extern boolean sched_addreadytorun(FAR _TCB *rtrtcb); -extern boolean sched_removereadytorun(FAR _TCB *rtrtcb); -extern boolean sched_addprioritized(FAR _TCB *newTcb, - DSEG dq_queue_t *list); -extern boolean sched_mergepending(void); -extern void sched_addblocked(FAR _TCB *btcb, tstate_t task_state); -extern void sched_removeblocked(FAR _TCB *btcb); -extern int sched_setpriority(FAR _TCB *tcb, int sched_priority); +extern bool sched_addreadytorun(FAR _TCB *rtrtcb); +extern bool sched_removereadytorun(FAR _TCB *rtrtcb); +extern bool sched_addprioritized(FAR _TCB *newTcb, DSEG dq_queue_t *list); +extern bool sched_mergepending(void); +extern void sched_addblocked(FAR _TCB *btcb, tstate_t task_state); +extern void sched_removeblocked(FAR _TCB *btcb); +extern int sched_setpriority(FAR _TCB *tcb, int sched_priority); #ifdef CONFIG_PRIORITY_INHERITANCE -extern int sched_reprioritize(FAR _TCB *tcb, int sched_priority); +extern int sched_reprioritize(FAR _TCB *tcb, int sched_priority); #else # define sched_reprioritize(tcb,sched_priority) sched_setpriority(tcb,sched_priority) #endif extern FAR _TCB *sched_gettcb(pid_t pid); -extern boolean sched_verifytcb(FAR _TCB *tcb); +extern bool sched_verifytcb(FAR _TCB *tcb); #if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 -extern int sched_setupidlefiles(FAR _TCB *tcb); -extern int sched_setuptaskfiles(FAR _TCB *tcb); -extern int sched_setuppthreadfiles(FAR _TCB *tcb); +extern int sched_setupidlefiles(FAR _TCB *tcb); +extern int sched_setuptaskfiles(FAR _TCB *tcb); +extern int sched_setuppthreadfiles(FAR _TCB *tcb); #if CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 -extern int sched_setupstreams(FAR _TCB *tcb); -extern int sched_flushfiles(FAR _TCB *tcb); +extern int sched_setupstreams(FAR _TCB *tcb); +extern int sched_flushfiles(FAR _TCB *tcb); #endif -extern int sched_releasefiles(FAR _TCB *tcb); +extern int sched_releasefiles(FAR _TCB *tcb); #endif -extern int sched_releasetcb(FAR _TCB *tcb); -extern void sched_garbagecollection(void); +extern int sched_releasetcb(FAR _TCB *tcb); +extern void sched_garbagecollection(void); #endif /* __OS_INTERNAL_H */ diff --git a/sched/os_start.c b/sched/os_start.c index 6f36f58a625..3c25b7008cb 100644 --- a/sched/os_start.c +++ b/sched/os_start.c @@ -38,6 +38,7 @@ ****************************************************************************/ #include +#include #include #include @@ -66,7 +67,7 @@ #endif /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -174,18 +175,18 @@ pid_t g_worker; const tasklist_t g_tasklisttable[NUM_TASK_STATES] = { - { NULL, FALSE }, /* TSTATE_TASK_INVALID */ - { &g_pendingtasks, TRUE }, /* TSTATE_TASK_PENDING */ - { &g_readytorun, TRUE }, /* TSTATE_TASK_READYTORUN */ - { &g_readytorun, TRUE }, /* TSTATE_TASK_RUNNING */ - { &g_inactivetasks, FALSE }, /* TSTATE_TASK_INACTIVE */ - { &g_waitingforsemaphore, TRUE }, /* TSTATE_WAIT_SEM */ + { NULL, false }, /* TSTATE_TASK_INVALID */ + { &g_pendingtasks, true }, /* TSTATE_TASK_PENDING */ + { &g_readytorun, true }, /* TSTATE_TASK_READYTORUN */ + { &g_readytorun, true }, /* TSTATE_TASK_RUNNING */ + { &g_inactivetasks, false }, /* TSTATE_TASK_INACTIVE */ + { &g_waitingforsemaphore, true }, /* TSTATE_WAIT_SEM */ #ifndef CONFIG_DISABLE_SIGNALS - { &g_waitingforsignal, FALSE }, /* TSTATE_WAIT_SIG */ + { &g_waitingforsignal, false }, /* TSTATE_WAIT_SIG */ #endif #ifndef CONFIG_DISABLE_MQUEUE - { &g_waitingformqnotempty, TRUE }, /* TSTATE_WAIT_MQNOTEMPTY */ - { &g_waitingformqnotfull, TRUE } /* TSTATE_WAIT_MQNOTFULL */ + { &g_waitingformqnotempty, true }, /* TSTATE_WAIT_MQNOTEMPTY */ + { &g_waitingformqnotfull, true } /* TSTATE_WAIT_MQNOTFULL */ #endif }; diff --git a/sched/pthread_completejoin.c b/sched/pthread_completejoin.c index fa91e4a6a43..fff3b46cf25 100644 --- a/sched/pthread_completejoin.c +++ b/sched/pthread_completejoin.c @@ -37,15 +37,19 @@ * Included Files ************************************************************************/ +#include + #include +#include #include #include #include + #include "os_internal.h" #include "pthread_internal.h" /************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************/ /************************************************************************ @@ -74,7 +78,7 @@ * ************************************************************************/ -static boolean pthread_notifywaiters(FAR join_t *pjoin) +static bool pthread_notifywaiters(FAR join_t *pjoin) { int ntasks_waiting; int status; @@ -111,9 +115,9 @@ static boolean pthread_notifywaiters(FAR join_t *pjoin) */ (void)pthread_takesemaphore(&pjoin->data_sem); - return TRUE; + return true; } - return FALSE; + return false; } /************************************************************************ @@ -158,11 +162,11 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value) } else { - boolean waiters; + bool waiters; /* Save the return exit value in the thread structure. */ - pjoin->terminated = TRUE; + pjoin->terminated = true; pjoin->exit_value = exit_value; /* Notify waiters of the availability of the exit value */ diff --git a/sched/pthread_create.c b/sched/pthread_create.c index 4f3d05bdc1c..b49698122a4 100644 --- a/sched/pthread_create.c +++ b/sched/pthread_create.c @@ -38,7 +38,9 @@ ****************************************************************************/ #include + #include +#include #include #include #include @@ -47,13 +49,14 @@ #include #include #include + #include "os_internal.h" #include "clock_internal.h" #include "env_internal.h" #include "pthread_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -204,7 +207,7 @@ static void pthread_start(void) /* Report to the spawner that we successfully started. */ - pjoin->started = TRUE; + pjoin->started = true; (void)pthread_givesemaphore(&pjoin->data_sem); /* Pass control to the thread entry point. The argument is diff --git a/sched/pthread_detach.c b/sched/pthread_detach.c index dc835293030..52ea63ca538 100644 --- a/sched/pthread_detach.c +++ b/sched/pthread_detach.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -48,7 +49,7 @@ #include "pthread_internal.h" /************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************/ /************************************************************************ @@ -121,7 +122,7 @@ int pthread_detach(pthread_t thread) * thread exits */ - pjoin->detached = TRUE; + pjoin->detached = true; } /* Either case is successful */ diff --git a/sched/pthread_internal.h b/sched/pthread_internal.h index 55d58d49f2f..1770ff1b50a 100644 --- a/sched/pthread_internal.h +++ b/sched/pthread_internal.h @@ -40,13 +40,16 @@ * Included Files ****************************************************************************/ +#include + #include #include +#include #include #include /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -66,9 +69,9 @@ struct join_s { FAR struct join_s *next; /* Implements link list */ uint8_t crefs; /* Reference count */ - boolean started; /* TRUE: pthread started. */ - boolean detached; /* TRUE: pthread_detached'ed */ - boolean terminated; /* TRUE: detach'ed+exit'ed */ + bool started; /* true: pthread started. */ + bool detached; /* true: pthread_detached'ed */ + bool terminated; /* true: detach'ed+exit'ed */ pthread_t thread; /* Includes pid */ sem_t exit_sem; /* Implements join */ sem_t data_sem; /* Implements join */ diff --git a/sched/pthread_once.c b/sched/pthread_once.c index b2db0ab5f4e..dc0fcd2bd7b 100644 --- a/sched/pthread_once.c +++ b/sched/pthread_once.c @@ -39,13 +39,14 @@ #include +#include #include #include #include #include /******************************************************************************** - * Definitions + * Pre-processor Definitions ********************************************************************************/ /******************************************************************************** @@ -104,7 +105,7 @@ int pthread_once(FAR pthread_once_t *once_control, CODE void (*init_routine)(voi sched_lock(); if (!*once_control) { - *once_control = TRUE; + *once_control = true; /* Call the init_routine with pre-emption enabled. */ diff --git a/sched/sched_addprioritized.c b/sched/sched_addprioritized.c index 824dc32d651..d937dcee3ed 100644 --- a/sched/sched_addprioritized.c +++ b/sched/sched_addprioritized.c @@ -40,13 +40,14 @@ #include #include +#include #include #include #include "os_internal.h" /************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************/ /************************************************************************ @@ -80,7 +81,7 @@ * list - Points to the prioritized list to add tcb to * * Return Value: - * TRUE if the head of the list has changed. + * true if the head of the list has changed. * * Assumptions: * - The caller has established a critical section before @@ -94,12 +95,12 @@ * match the state associated with the list. ************************************************************************/ -boolean sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list) +bool sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list) { FAR _TCB *next; FAR _TCB *prev; uint8_t sched_priority = tcb->sched_priority; - boolean ret = FALSE; + bool ret = false; /* Lets do a sanity check before we get started. */ @@ -131,7 +132,7 @@ boolean sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list) tcb->blink = NULL; list->head = (FAR dq_entry_t*)tcb; list->tail = (FAR dq_entry_t*)tcb; - ret = TRUE; + ret = true; } else { @@ -156,7 +157,7 @@ boolean sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list) tcb->blink = NULL; next->blink = tcb; list->head = (FAR dq_entry_t*)tcb; - ret = TRUE; + ret = true; } else { diff --git a/sched/sched_addreadytorun.c b/sched/sched_addreadytorun.c index 503d15f985e..51e219342b5 100644 --- a/sched/sched_addreadytorun.c +++ b/sched/sched_addreadytorun.c @@ -39,13 +39,14 @@ #include +#include #include #include #include "os_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -83,7 +84,7 @@ * btcb - Points to the blocked TCB that is ready-to-run * * Return Value: - * TRUE if the currently active task (the head of the + * true if the currently active task (the head of the * g_readytorun list) has changed. * * Assumptions: @@ -97,10 +98,10 @@ * ****************************************************************************/ -boolean sched_addreadytorun(FAR _TCB *btcb) +bool sched_addreadytorun(FAR _TCB *btcb) { FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; - boolean ret; + bool ret; /* Check if pre-emption is disabled for the current running * task and if the new ready-to-run task would cause the @@ -115,7 +116,7 @@ boolean sched_addreadytorun(FAR _TCB *btcb) sched_addprioritized(btcb, (FAR dq_queue_t*)&g_pendingtasks); btcb->task_state = TSTATE_TASK_PENDING; - ret = FALSE; + ret = false; } /* Otherwise, add the new task to the g_readytorun task list */ @@ -134,14 +135,14 @@ boolean sched_addreadytorun(FAR _TCB *btcb) btcb->task_state = TSTATE_TASK_RUNNING; btcb->flink->task_state = TSTATE_TASK_READYTORUN; - ret = TRUE; + ret = true; } else { /* The new btcb was added in the middle of the g_readytorun list */ btcb->task_state = TSTATE_TASK_READYTORUN; - ret = FALSE; + ret = false; } return ret; diff --git a/sched/sched_mergepending.c b/sched/sched_mergepending.c index c45010e8c03..1448c009610 100644 --- a/sched/sched_mergepending.c +++ b/sched/sched_mergepending.c @@ -39,13 +39,14 @@ #include +#include #include #include #include "os_internal.h" /************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************/ /************************************************************************ @@ -79,7 +80,7 @@ * None * * Return Value: - * TRUE if the head of the g_readytorun task list has changed. + * true if the head of the g_readytorun task list has changed. * * Assumptions: * - The caller has established a critical section before @@ -90,13 +91,13 @@ * ************************************************************************/ -boolean sched_mergepending(void) +bool sched_mergepending(void) { FAR _TCB *pndtcb; FAR _TCB *pndnext; FAR _TCB *rtrtcb; FAR _TCB *rtrprev; - boolean ret = FALSE; + bool ret = false; /* Initialize the inner search loop */ @@ -142,7 +143,7 @@ boolean sched_mergepending(void) g_readytorun.head = (FAR dq_entry_t*)pndtcb; rtrtcb->task_state = TSTATE_TASK_READYTORUN; pndtcb->task_state = TSTATE_TASK_RUNNING; - ret = TRUE; + ret = true; } else { diff --git a/sched/sched_removereadytorun.c b/sched/sched_removereadytorun.c index f09b5fc9910..46f148150a7 100644 --- a/sched/sched_removereadytorun.c +++ b/sched/sched_removereadytorun.c @@ -39,13 +39,14 @@ #include +#include #include #include #include "os_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -78,7 +79,7 @@ * rtcb - Points to the TCB that is ready-to-run * * Return Value: - * TRUE if the currently active task (the head of the + * true if the currently active task (the head of the * g_readytorun list) has changed. * * Assumptions: @@ -87,11 +88,12 @@ * a good idea -- use irqsave()). * - The caller handles the condition that occurs if the * the head of the g_readytorun list is changed. + * ****************************************************************************/ -boolean sched_removereadytorun(FAR _TCB *rtcb) +bool sched_removereadytorun(FAR _TCB *rtcb) { - boolean ret = FALSE; + bool ret = false; /* Check if the TCB to be removed is at the head of the ready * to run list. In this case, we are removing the currently @@ -109,7 +111,7 @@ boolean sched_removereadytorun(FAR _TCB *rtcb) sched_note_switch(rtcb, rtcb->flink); rtcb->flink->task_state = TSTATE_TASK_RUNNING; - ret = TRUE; + ret = true; } /* Remove the TCB from the ready-to-run list */ diff --git a/sched/sched_verifytcb.c b/sched/sched_verifytcb.c index 5b91e77d23e..af7cdebe14a 100644 --- a/sched/sched_verifytcb.c +++ b/sched/sched_verifytcb.c @@ -39,6 +39,7 @@ #include +#include #include #include "os_internal.h" @@ -71,12 +72,12 @@ * Name: sched_verifytcb * * Description: - * Return TRUE if the tcb refers to an active task; FALSE if it is a stale + * Return true if the tcb refers to an active task; false if it is a stale * TCB handle. * ****************************************************************************/ -boolean sched_verifytcb(FAR _TCB *tcb) +bool sched_verifytcb(FAR _TCB *tcb) { /* Return true if the PID hashes to this TCB. */ diff --git a/sched/sem_internal.h b/sched/sem_internal.h index 054946301a1..feb99ef0b3d 100644 --- a/sched/sem_internal.h +++ b/sched/sem_internal.h @@ -44,12 +44,13 @@ #include #include +#include #include #include #include /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -64,7 +65,7 @@ struct nsem_s FAR struct nsem_s *blink; /* Backward link */ uint16_t nconnect; /* Number of connections to semaphore */ FAR char *name; /* Semaphore name (NULL if un-named) */ - boolean unlinked; /* TRUE if the semaphore has been unlinked */ + bool unlinked; /* true if the semaphore has been unlinked */ sem_t sem; /* The semaphore itself */ }; typedef struct nsem_s nsem_t; diff --git a/sched/sem_open.c b/sched/sem_open.c index aeb5097eb28..cd9ca6129ab 100644 --- a/sched/sem_open.c +++ b/sched/sem_open.c @@ -37,7 +37,10 @@ * Included Files ****************************************************************************/ +#include + #include +#include #include #include #include @@ -48,7 +51,7 @@ #include "sem_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -178,7 +181,7 @@ FAR sem_t *sem_open (FAR const char *name, int oflag, ...) sem_init(sem, 0, value); psem->nconnect = 1; - psem->unlinked = FALSE; + psem->unlinked = false; psem->name = (FAR char*)psem + sizeof(nsem_t); strcpy(psem->name, name); diff --git a/sched/sem_trywait.c b/sched/sem_trywait.c index 27eb6a60c86..d50dc106dda 100644 --- a/sched/sem_trywait.c +++ b/sched/sem_trywait.c @@ -39,6 +39,7 @@ #include +#include #include #include #include @@ -48,7 +49,7 @@ #include "sem_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -102,7 +103,7 @@ int sem_trywait(FAR sem_t *sem) /* This API should not be called from interrupt handlers */ - DEBUGASSERT(up_interrupt_context() == FALSE) + DEBUGASSERT(up_interrupt_context() == false) /* Assume any errors reported are due to invalid arguments. */ diff --git a/sched/sem_unlink.c b/sched/sem_unlink.c index 79f8be0104f..ec08641803d 100644 --- a/sched/sem_unlink.c +++ b/sched/sem_unlink.c @@ -39,6 +39,7 @@ #include +#include #include #include #include @@ -47,7 +48,7 @@ #include "sem_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -126,7 +127,7 @@ int sem_unlink(FAR const char *name) else { - psem->unlinked = TRUE; + psem->unlinked = true; } ret = OK; } diff --git a/sched/sem_wait.c b/sched/sem_wait.c index f723b721504..747d7cd48bb 100644 --- a/sched/sem_wait.c +++ b/sched/sem_wait.c @@ -39,6 +39,7 @@ #include +#include #include #include #include @@ -48,7 +49,7 @@ #include "sem_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -101,7 +102,7 @@ int sem_wait(FAR sem_t *sem) /* This API should not be called from interrupt handlers */ - DEBUGASSERT(up_interrupt_context() == FALSE) + DEBUGASSERT(up_interrupt_context() == false) /* Assume any errors reported are due to invalid arguments. */ diff --git a/sched/sig_ismember.c b/sched/sig_ismember.c index 77cd520fd06..670ef7bd207 100644 --- a/sched/sig_ismember.c +++ b/sched/sig_ismember.c @@ -40,7 +40,7 @@ #include /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -75,7 +75,7 @@ * signo - Signal to test for * * Return Value: - * 1 (TRUE), if the specified signal is a member of the set, + * 1 (true), if the specified signal is a member of the set, * 0 (OK or FALSE), if it is not, or * -1 (ERROR) if the signal number is invalid. * diff --git a/sched/wd_cancel.c b/sched/wd_cancel.c index f17e0d227c7..ea686cf92aa 100644 --- a/sched/wd_cancel.c +++ b/sched/wd_cancel.c @@ -39,6 +39,7 @@ #include +#include #include #include #include @@ -47,7 +48,7 @@ #include "wd_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -156,7 +157,7 @@ int wd_cancel (WDOG_ID wdid) /* Mark the watchdog inactive */ - wdid->active = FALSE; + wdid->active = false; } irqrestore(saved_state); return ret; diff --git a/sched/wd_create.c b/sched/wd_create.c index 296ff5c3dde..a383de6a5be 100644 --- a/sched/wd_create.c +++ b/sched/wd_create.c @@ -39,6 +39,7 @@ #include +#include #include #include #include @@ -46,7 +47,7 @@ #include "wd_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -101,7 +102,7 @@ WDOG_ID wd_create (void) if (wdog) { wdog->next = NULL; - wdog->active = FALSE; + wdog->active = false; } return (WDOG_ID)wdog; } diff --git a/sched/wd_internal.h b/sched/wd_internal.h index 2a64d9eafff..4df2a0e6576 100644 --- a/sched/wd_internal.h +++ b/sched/wd_internal.h @@ -43,11 +43,12 @@ #include #include +#include #include #include /************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************/ /************************************************************************ @@ -66,7 +67,7 @@ struct wdog_s FAR void *picbase; /* PIC base address */ #endif int lag; /* Timer associated with the delay */ - boolean active; /* TRUE if the watchdog is actively timing */ + bool active; /* true if the watchdog is actively timing */ uint8_t argc; /* The number of parameters to pass */ uint32_t parm[CONFIG_MAX_WDOGPARMS]; }; diff --git a/sched/wd_start.c b/sched/wd_start.c index 31bc3bea0cc..1f37dbf99fd 100644 --- a/sched/wd_start.c +++ b/sched/wd_start.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -52,7 +53,7 @@ #include "wd_internal.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -267,7 +268,7 @@ int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...) /* Put the lag into the watchdog structure and mark it as active. */ wdog->lag = delay; - wdog->active = TRUE; + wdog->active = true; irqrestore(saved_state); return OK; @@ -330,7 +331,7 @@ void wd_timer(void) /* Indicate that the watchdog is no longer active. */ - wdog->active = FALSE; + wdog->active = false; /* Get the current task's process ID. We'll need this later to * see if the watchdog function caused a context switch.