diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2008-09-04 15:23:12 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2008-09-04 15:23:12 +0000 |
commit | f8437c81d5e191ebe10374938974315aee07faf3 (patch) | |
tree | 81e073f66d0e943a7067e5b36923dd1a10219137 /cpukit/posix/src | |
parent | 2008-09-04 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-f8437c81d5e191ebe10374938974315aee07faf3.tar.bz2 |
Convert to "bool".
Diffstat (limited to '')
31 files changed, 67 insertions, 68 deletions
diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c index 9a3b18481a..56a574e9e4 100644 --- a/cpukit/posix/src/cancel.c +++ b/cpukit/posix/src/cancel.c @@ -37,7 +37,7 @@ int pthread_cancel( Thread_Control *the_thread; POSIX_API_Control *thread_support; Objects_Locations location; - boolean cancel = FALSE; + bool cancel = false; /* * Don't even think about deleting a resource from an ISR. @@ -56,7 +56,7 @@ int pthread_cancel( if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS) - cancel = TRUE; + cancel = true; _Thread_Enable_dispatch(); if ( cancel ) diff --git a/cpukit/posix/src/condsignalsupp.c b/cpukit/posix/src/condsignalsupp.c index 81ab428920..47e23b5b8e 100644 --- a/cpukit/posix/src/condsignalsupp.c +++ b/cpukit/posix/src/condsignalsupp.c @@ -34,7 +34,7 @@ int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, - boolean is_broadcast + bool is_broadcast ) { register POSIX_Condition_variables_Control *the_cond; diff --git a/cpukit/posix/src/condtimedwait.c b/cpukit/posix/src/condtimedwait.c index ef615b7d1d..46b872b465 100644 --- a/cpukit/posix/src/condtimedwait.c +++ b/cpukit/posix/src/condtimedwait.c @@ -40,7 +40,7 @@ int pthread_cond_timedwait( ) { Watchdog_Interval ticks; - boolean already_timedout; + bool already_timedout; /* * POSIX requires that blocking calls with timeouts that take diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c index 4d2c66d27b..f08c7d0649 100644 --- a/cpukit/posix/src/condwaitsupp.c +++ b/cpukit/posix/src/condwaitsupp.c @@ -36,7 +36,7 @@ int _POSIX_Condition_variables_Wait_support( pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, - boolean already_timedout + bool already_timedout ) { register POSIX_Condition_variables_Control *the_cond; diff --git a/cpukit/posix/src/keyrundestructors.c b/cpukit/posix/src/keyrundestructors.c index 87da55da58..de37741765 100644 --- a/cpukit/posix/src/keyrundestructors.c +++ b/cpukit/posix/src/keyrundestructors.c @@ -41,7 +41,7 @@ void _POSIX_Keys_Run_destructors( uint32_t thread_index; uint32_t thread_api; uint32_t iterations; - boolean are_all_null; + bool are_all_null; POSIX_Keys_Control *the_key; void *value; diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c index df5fd62c15..2702c7cdbc 100644 --- a/cpukit/posix/src/killinfo.c +++ b/cpukit/posix/src/killinfo.c @@ -296,7 +296,7 @@ int killinfo( process_it: - the_thread->do_post_task_switch_extension = TRUE; + the_thread->do_post_task_switch_extension = true; /* * Returns TRUE if the signal was synchronously given to a thread diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c index 08d7fbc0a5..dff76c184d 100644 --- a/cpukit/posix/src/mqueuerecvsupp.c +++ b/cpukit/posix/src/mqueuerecvsupp.c @@ -51,7 +51,7 @@ ssize_t _POSIX_Message_queue_Receive_support( char *msg_ptr, size_t msg_len, unsigned int *msg_prio, - boolean wait, + bool wait, Watchdog_Interval timeout ) { @@ -59,7 +59,7 @@ ssize_t _POSIX_Message_queue_Receive_support( POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; size_t length_out; - boolean do_wait; + bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { diff --git a/cpukit/posix/src/mqueuesendsupp.c b/cpukit/posix/src/mqueuesendsupp.c index 8a593c816c..c33bec7ae3 100644 --- a/cpukit/posix/src/mqueuesendsupp.c +++ b/cpukit/posix/src/mqueuesendsupp.c @@ -50,7 +50,7 @@ int _POSIX_Message_queue_Send_support( const char *msg_ptr, size_t msg_len, uint32_t msg_prio, - boolean wait, + bool wait, Watchdog_Interval timeout ) { @@ -58,7 +58,7 @@ int _POSIX_Message_queue_Send_support( POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Status msg_status; - boolean do_wait; + bool do_wait; /* * Validate the priority. diff --git a/cpukit/posix/src/mqueuetimedreceive.c b/cpukit/posix/src/mqueuetimedreceive.c index 6e050bd10c..55ca4c4c90 100644 --- a/cpukit/posix/src/mqueuetimedreceive.c +++ b/cpukit/posix/src/mqueuetimedreceive.c @@ -57,7 +57,7 @@ ssize_t mq_timedreceive( ) { Watchdog_Interval ticks; - boolean do_wait; + bool do_wait; /* * POSIX requires that blocking calls with timeouts that take diff --git a/cpukit/posix/src/mqueuetimedsend.c b/cpukit/posix/src/mqueuetimedsend.c index 2ab56e879e..423df8cbab 100644 --- a/cpukit/posix/src/mqueuetimedsend.c +++ b/cpukit/posix/src/mqueuetimedsend.c @@ -57,7 +57,7 @@ int mq_timedsend( ) { Watchdog_Interval ticks; - boolean do_wait; + bool do_wait; /* * POSIX requires that blocking calls with timeouts that take diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c index d522b7cf97..43c80d054e 100644 --- a/cpukit/posix/src/mutexlocksupp.c +++ b/cpukit/posix/src/mutexlocksupp.c @@ -36,7 +36,7 @@ int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, - boolean blocking, + bool blocking, Watchdog_Interval timeout ) { diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c index 5eae6eae76..623644b466 100644 --- a/cpukit/posix/src/mutextimedlock.c +++ b/cpukit/posix/src/mutextimedlock.c @@ -43,7 +43,7 @@ int pthread_mutex_timedlock( ) { Watchdog_Interval ticks; - boolean do_wait; + bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; int lock_status; diff --git a/cpukit/posix/src/prwlocktimedrdlock.c b/cpukit/posix/src/prwlocktimedrdlock.c index 52462acab6..545a7885e8 100644 --- a/cpukit/posix/src/prwlocktimedrdlock.c +++ b/cpukit/posix/src/prwlocktimedrdlock.c @@ -43,7 +43,7 @@ int pthread_rwlock_timedrdlock( POSIX_RWLock_Control *the_rwlock; Objects_Locations location; Watchdog_Interval ticks; - boolean do_wait; + bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) diff --git a/cpukit/posix/src/prwlocktimedwrlock.c b/cpukit/posix/src/prwlocktimedwrlock.c index a826df8371..1900c30f06 100644 --- a/cpukit/posix/src/prwlocktimedwrlock.c +++ b/cpukit/posix/src/prwlocktimedwrlock.c @@ -43,7 +43,7 @@ int pthread_rwlock_timedwrlock( POSIX_RWLock_Control *the_rwlock; Objects_Locations location; Watchdog_Interval ticks; - boolean do_wait; + bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c index 493b315d39..e9831256a6 100644 --- a/cpukit/posix/src/psignal.c +++ b/cpukit/posix/src/psignal.c @@ -131,10 +131,10 @@ void _POSIX_signals_Post_switch_extension( for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { - if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) + if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; - if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) + if ( _POSIX_signals_Check_signal( api, signo, true ) ) goto restart; } @@ -143,10 +143,10 @@ void _POSIX_signals_Post_switch_extension( for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { - if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) + if ( _POSIX_signals_Check_signal( api, signo, false ) ) goto restart; - if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) + if ( _POSIX_signals_Check_signal( api, signo, true ) ) goto restart; } diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c index d13e3b6d0d..20bc24daef 100644 --- a/cpukit/posix/src/psignalchecksignal.c +++ b/cpukit/posix/src/psignalchecksignal.c @@ -36,18 +36,18 @@ * _POSIX_signals_Check_signal */ -boolean _POSIX_signals_Check_signal( +bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, - boolean is_global + bool is_global ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, - is_global, TRUE ) ) - return FALSE; + is_global, true ) ) + return false; /* * Since we made a union of these, only one test is necessary but this is @@ -62,7 +62,7 @@ boolean _POSIX_signals_Check_signal( * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) - return FALSE; + return false; /* * Block the signals requested in sa_mask @@ -91,5 +91,5 @@ boolean _POSIX_signals_Check_signal( */ api->signals_blocked = saved_signals_blocked; - return TRUE; + return true; } diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c index 0ed0960eb3..1c4f61fb1d 100644 --- a/cpukit/posix/src/psignalclearsignals.c +++ b/cpukit/posix/src/psignalclearsignals.c @@ -34,23 +34,23 @@ * _POSIX_signals_Clear_signals */ -boolean _POSIX_signals_Clear_signals( +bool _POSIX_signals_Clear_signals( POSIX_API_Control *api, int signo, siginfo_t *info, - boolean is_global, - boolean check_blocked + bool is_global, + bool check_blocked ) { sigset_t mask; sigset_t signals_blocked; ISR_Level level; - boolean do_callout; + bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); - do_callout = FALSE; + do_callout = false; /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. @@ -79,15 +79,15 @@ boolean _POSIX_signals_Clear_signals( &psiginfo->Node ); } else - do_callout = FALSE; + do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); - do_callout = TRUE; + do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; - do_callout = TRUE; + do_callout = true; } } _ISR_Enable( level ); diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c index 980413ff74..40cb43a8a9 100644 --- a/cpukit/posix/src/psignalunblockthread.c +++ b/cpukit/posix/src/psignalunblockthread.c @@ -36,7 +36,7 @@ */ /* XXX this routine could probably be cleaned up */ -boolean _POSIX_signals_Unblock_thread( +bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info @@ -70,14 +70,14 @@ boolean _POSIX_signals_Unblock_thread( } _Thread_queue_Extract_with_proxy( the_thread ); - return TRUE; + return true; } /* * This should only be reached via pthread_kill(). */ - return FALSE; + return false; } /* @@ -98,7 +98,7 @@ boolean _POSIX_signals_Unblock_thread( * + Any other combination, do nothing. */ - the_thread->do_post_task_switch_extension = TRUE; + the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { the_thread->Wait.return_code = EINTR; @@ -123,6 +123,5 @@ boolean _POSIX_signals_Unblock_thread( _ISR_Signals_to_thread_executing = TRUE; } } - return FALSE; - + return false; } diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 30989e0f03..4a53d939be 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -136,7 +136,7 @@ void _POSIX_Threads_Sporadic_budget_callout( * XXX */ -boolean _POSIX_Threads_Create_extension( +bool _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) @@ -147,7 +147,7 @@ boolean _POSIX_Threads_Create_extension( api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) - return FALSE; + return false; created->API_Extensions[ THREAD_API_POSIX ] = api; @@ -196,7 +196,7 @@ boolean _POSIX_Threads_Create_extension( created ); - return TRUE; + return true; } /*PAGE diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index c579fb3e14..69feb1e0c3 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -47,8 +47,8 @@ int pthread_create( Priority_Control core_priority; Thread_CPU_budget_algorithms budget_algorithm; Thread_CPU_budget_algorithm_callout budget_callout; - boolean is_fp; - boolean status; + bool is_fp; + bool status; Thread_Control *the_thread; POSIX_API_Control *api; int schedpolicy = SCHED_RR; @@ -231,7 +231,7 @@ int pthread_create( * NOTE: Since the thread starts with all unblocked, this is necessary. */ - the_thread->do_post_task_switch_extension = TRUE; + the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c index e8de99f4dd..df3b146323 100644 --- a/cpukit/posix/src/pthreadkill.c +++ b/cpukit/posix/src/pthreadkill.c @@ -63,7 +63,7 @@ int pthread_kill( (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); - the_thread->do_post_task_switch_extension = TRUE; + the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = TRUE; diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c index 59bc688fcd..2fdc720282 100644 --- a/cpukit/posix/src/pthreadsigmask.c +++ b/cpukit/posix/src/pthreadsigmask.c @@ -65,7 +65,7 @@ int pthread_sigmask( if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { - _Thread_Executing->do_post_task_switch_extension = TRUE; + _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c index d1a506cb04..76e7edc4bc 100644 --- a/cpukit/posix/src/semaphorewaitsupp.c +++ b/cpukit/posix/src/semaphorewaitsupp.c @@ -34,7 +34,7 @@ int _POSIX_Semaphore_Wait_support( sem_t *sem, - boolean blocking, + bool blocking, Watchdog_Interval timeout ) { diff --git a/cpukit/posix/src/semtimedwait.c b/cpukit/posix/src/semtimedwait.c index b76fa17a81..1d8874a27b 100644 --- a/cpukit/posix/src/semtimedwait.c +++ b/cpukit/posix/src/semtimedwait.c @@ -40,7 +40,7 @@ int sem_timedwait( ) { Watchdog_Interval ticks; - boolean do_wait = TRUE; + bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; int lock_status; @@ -58,10 +58,10 @@ int sem_timedwait( case POSIX_ABSOLUTE_TIMEOUT_INVALID: case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: - do_wait = FALSE; + do_wait = false; break; case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: - do_wait = TRUE; + do_wait = true; break; } diff --git a/cpukit/posix/src/setcancelstate.c b/cpukit/posix/src/setcancelstate.c index 8df8f55d4b..f11d865366 100644 --- a/cpukit/posix/src/setcancelstate.c +++ b/cpukit/posix/src/setcancelstate.c @@ -36,7 +36,7 @@ int pthread_setcancelstate( ) { POSIX_API_Control *thread_support; - boolean cancel = FALSE; + bool cancel = false; /* * Don't even think about deleting a resource from an ISR. @@ -62,7 +62,7 @@ int pthread_setcancelstate( if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) - cancel = TRUE; + cancel = true; _Thread_Enable_dispatch(); if ( cancel ) diff --git a/cpukit/posix/src/setcanceltype.c b/cpukit/posix/src/setcanceltype.c index fbd7beadf2..403e16b812 100644 --- a/cpukit/posix/src/setcanceltype.c +++ b/cpukit/posix/src/setcanceltype.c @@ -36,7 +36,7 @@ int pthread_setcanceltype( ) { POSIX_API_Control *thread_support; - boolean cancel = FALSE; + bool cancel = false; /* * Don't even think about deleting a resource from an ISR. @@ -62,7 +62,7 @@ int pthread_setcanceltype( if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) - cancel = TRUE; + cancel = true; _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c index 45571e24a4..a6b34bc68b 100644 --- a/cpukit/posix/src/sigtimedwait.c +++ b/cpukit/posix/src/sigtimedwait.c @@ -104,8 +104,8 @@ int sigtimedwait( api, the_info->si_signo, the_info, - FALSE, - FALSE + false, + false ); _ISR_Enable( level ); @@ -118,7 +118,7 @@ int sigtimedwait( if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); - _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); + _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; @@ -144,7 +144,7 @@ int sigtimedwait( * the signal. */ - _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, FALSE, FALSE ); + _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } diff --git a/cpukit/posix/src/testcancel.c b/cpukit/posix/src/testcancel.c index 2c60b0e72c..bea71203d1 100644 --- a/cpukit/posix/src/testcancel.c +++ b/cpukit/posix/src/testcancel.c @@ -33,7 +33,7 @@ void pthread_testcancel( void ) { POSIX_API_Control *thread_support; - boolean cancel = FALSE; + bool cancel = false; /* * Don't even think about deleting a resource from an ISR. @@ -49,7 +49,7 @@ void pthread_testcancel( void ) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) - cancel = TRUE; + cancel = true; _Thread_Enable_dispatch(); if ( cancel ) diff --git a/cpukit/posix/src/timerinserthelper.c b/cpukit/posix/src/timerinserthelper.c index 79178ca605..a2ced7a79b 100644 --- a/cpukit/posix/src/timerinserthelper.c +++ b/cpukit/posix/src/timerinserthelper.c @@ -24,7 +24,7 @@ #include <rtems/posix/timer.h> #include <rtems/posix/ptimer.h> -boolean _POSIX_Timer_Insert_helper( +bool _POSIX_Timer_Insert_helper( Watchdog_Control *timer, Watchdog_Interval ticks, Objects_Id id, @@ -43,7 +43,7 @@ boolean _POSIX_Timer_Insert_helper( */ if ( timer->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); - return FALSE; + return false; } /* @@ -53,5 +53,5 @@ boolean _POSIX_Timer_Insert_helper( _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); - return TRUE; + return true; } diff --git a/cpukit/posix/src/timersettime.c b/cpukit/posix/src/timersettime.c index 2a4a90e345..6099ae0400 100644 --- a/cpukit/posix/src/timersettime.c +++ b/cpukit/posix/src/timersettime.c @@ -35,7 +35,7 @@ int timer_settime( { POSIX_Timer_Control *ptimer; Objects_Locations location; - boolean activated; + bool activated; uint32_t initial_period; struct itimerspec normalize; diff --git a/cpukit/posix/src/timertsr.c b/cpukit/posix/src/timertsr.c index 87bd718853..7f4b832030 100644 --- a/cpukit/posix/src/timertsr.c +++ b/cpukit/posix/src/timertsr.c @@ -33,7 +33,7 @@ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { POSIX_Timer_Control *ptimer; - boolean activated; + bool activated; ptimer = (POSIX_Timer_Control *)data; |