Convert to "bool".

This commit is contained in:
Ralf Corsepius
2008-09-04 15:23:12 +00:00
parent e866bd8dcc
commit f8437c81d5
51 changed files with 104 additions and 106 deletions
+3 -3
View File
@@ -124,7 +124,7 @@ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variabl
* and FALSE otherwise. * and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Condition_variables_Is_null (
POSIX_Condition_variables_Control *the_condition_variable POSIX_Condition_variables_Control *the_condition_variable
); );
@@ -139,7 +139,7 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
int _POSIX_Condition_variables_Signal_support( int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond, pthread_cond_t *cond,
boolean is_broadcast bool is_broadcast
); );
/* /*
@@ -155,7 +155,7 @@ int _POSIX_Condition_variables_Wait_support(
pthread_cond_t *cond, pthread_cond_t *cond,
pthread_mutex_t *mutex, pthread_mutex_t *mutex,
Watchdog_Interval timeout, Watchdog_Interval timeout,
boolean already_timedout bool already_timedout
); );
/* /*
+2 -2
View File
@@ -33,7 +33,7 @@ extern "C" {
typedef struct { typedef struct {
Objects_Control Object; Objects_Control Object;
boolean is_active; bool is_active;
void (*destructor)( void * ); void (*destructor)( void * );
void **Values[ OBJECTS_APIS_LAST + 1 ]; void **Values[ OBJECTS_APIS_LAST + 1 ];
} POSIX_Keys_Control; } POSIX_Keys_Control;
@@ -124,7 +124,7 @@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
* This function returns TRUE if the_key is NULL and FALSE otherwise. * This function returns TRUE if the_key is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Is_null (
POSIX_Keys_Control *the_key POSIX_Keys_Control *the_key
); );
+5 -5
View File
@@ -35,8 +35,8 @@ extern "C" {
typedef struct { typedef struct {
Objects_Control Object; Objects_Control Object;
int process_shared; int process_shared;
boolean named; bool named;
boolean linked; bool linked;
uint32_t open_count; uint32_t open_count;
CORE_message_queue_Control Message_queue; CORE_message_queue_Control Message_queue;
struct sigevent notification; struct sigevent notification;
@@ -112,7 +112,7 @@ ssize_t _POSIX_Message_queue_Receive_support(
char *msg_ptr, char *msg_ptr,
size_t msg_len, size_t msg_len,
unsigned int *msg_prio, unsigned int *msg_prio,
boolean wait, bool wait,
Watchdog_Interval timeout Watchdog_Interval timeout
); );
@@ -129,7 +129,7 @@ int _POSIX_Message_queue_Send_support(
const char *msg_ptr, const char *msg_ptr,
size_t msg_len, size_t msg_len,
uint32_t msg_prio, uint32_t msg_prio,
boolean wait, bool wait,
Watchdog_Interval timeout Watchdog_Interval timeout
); );
@@ -184,7 +184,7 @@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
* This function returns TRUE if the_message_queue is NULL and FALSE otherwise. * This function returns TRUE if the_message_queue is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Message_queue_Is_null (
POSIX_Message_queue_Control *the_mq POSIX_Message_queue_Control *the_mq
); );
+2 -2
View File
@@ -113,7 +113,7 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
* This function returns TRUE if the_mutex is NULL and FALSE otherwise. * This function returns TRUE if the_mutex is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_null (
POSIX_Mutex_Control *the_mutex POSIX_Mutex_Control *the_mutex
); );
#endif #endif
@@ -129,7 +129,7 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
int _POSIX_Mutex_Lock_support( int _POSIX_Mutex_Lock_support(
pthread_mutex_t *mutex, pthread_mutex_t *mutex,
boolean blocking, bool blocking,
Watchdog_Interval timeout Watchdog_Interval timeout
); );
+1 -1
View File
@@ -36,7 +36,7 @@
#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1) #define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid( RTEMS_INLINE_ROUTINE bool _POSIX_Priority_Is_valid(
int priority int priority
); );
+6 -6
View File
@@ -85,24 +85,24 @@ void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread Thread_Control *the_thread
); );
boolean _POSIX_signals_Unblock_thread( bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread, Thread_Control *the_thread,
int signo, int signo,
siginfo_t *info siginfo_t *info
); );
boolean _POSIX_signals_Check_signal( bool _POSIX_signals_Check_signal(
POSIX_API_Control *api, POSIX_API_Control *api,
int signo, int signo,
boolean is_global bool is_global
); );
boolean _POSIX_signals_Clear_signals( bool _POSIX_signals_Clear_signals(
POSIX_API_Control *api, POSIX_API_Control *api,
int signo, int signo,
siginfo_t *info, siginfo_t *info,
boolean is_global, bool is_global,
boolean check_blocked bool check_blocked
); );
int killinfo( int killinfo(
+1 -1
View File
@@ -123,7 +123,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
* This function returns TRUE if the_pthread is NULL and FALSE otherwise. * This function returns TRUE if the_pthread is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null( RTEMS_INLINE_ROUTINE bool _POSIX_Threads_Is_null(
Thread_Control *the_pthread Thread_Control *the_pthread
); );
+4 -4
View File
@@ -36,8 +36,8 @@ extern "C" {
typedef struct { typedef struct {
Objects_Control Object; Objects_Control Object;
int process_shared; int process_shared;
boolean named; bool named;
boolean linked; bool linked;
uint32_t open_count; uint32_t open_count;
CORE_semaphore_Control Semaphore; CORE_semaphore_Control Semaphore;
} POSIX_Semaphore_Control; } POSIX_Semaphore_Control;
@@ -112,7 +112,7 @@ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
* This function returns TRUE if the_semaphore is NULL and FALSE otherwise. * This function returns TRUE if the_semaphore is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_null (
POSIX_Semaphore_Control *the_semaphore POSIX_Semaphore_Control *the_semaphore
); );
@@ -154,7 +154,7 @@ void _POSIX_Semaphore_Delete(
int _POSIX_Semaphore_Wait_support( int _POSIX_Semaphore_Wait_support(
sem_t *sem, sem_t *sem,
boolean blocking, bool blocking,
Watchdog_Interval timeout Watchdog_Interval timeout
); );
+1 -1
View File
@@ -80,7 +80,7 @@ void _POSIX_Timer_TSR(Objects_Id timer, void *data);
/* /*
* Watchdog Insert helper * Watchdog Insert helper
*/ */
boolean _POSIX_Timer_Insert_helper( bool _POSIX_Timer_Insert_helper(
Watchdog_Control *timer, Watchdog_Control *timer,
Watchdog_Interval ticks, Watchdog_Interval ticks,
Objects_Id id, Objects_Id id,
+1 -1
View File
@@ -78,7 +78,7 @@ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
* *
* This function returns TRUE if the_barrier is NULL and FALSE otherwise. * This function returns TRUE if the_barrier is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Barrier_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Barrier_Is_null (
POSIX_Barrier_Control *the_barrier POSIX_Barrier_Control *the_barrier
) )
{ {
+1 -1
View File
@@ -58,7 +58,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
* _POSIX_Condition_variables_Is_null * _POSIX_Condition_variables_Is_null
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Condition_variables_Is_null (
POSIX_Condition_variables_Control *the_condition_variable POSIX_Condition_variables_Control *the_condition_variable
) )
{ {
+1 -1
View File
@@ -65,7 +65,7 @@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
* _POSIX_Keys_Is_null * _POSIX_Keys_Is_null
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Is_null (
POSIX_Keys_Control *the_key POSIX_Keys_Control *the_key
) )
{ {
+1 -2
View File
@@ -118,7 +118,7 @@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd
* _POSIX_Message_queue_Is_null * _POSIX_Message_queue_Is_null
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Message_queue_Is_null (
POSIX_Message_queue_Control *the_mq POSIX_Message_queue_Control *the_mq
) )
{ {
@@ -155,4 +155,3 @@ RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
#endif #endif
/* end of include file */ /* end of include file */
+1 -1
View File
@@ -51,7 +51,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
* _POSIX_Mutex_Is_null * _POSIX_Mutex_Is_null
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_null (
POSIX_Mutex_Control *the_mutex POSIX_Mutex_Control *the_mutex
) )
{ {
+2 -2
View File
@@ -28,11 +28,11 @@
* Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API. * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid( RTEMS_INLINE_ROUTINE bool _POSIX_Priority_Is_valid(
int priority int priority
) )
{ {
return (boolean) (priority >= 1 && priority <= 254); return (priority >= 1 && priority <= 254);
} }
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
+1 -1
View File
@@ -65,7 +65,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
* _POSIX_Threads_Is_null * _POSIX_Threads_Is_null
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Threads_Is_null (
Thread_Control *the_pthread Thread_Control *the_pthread
) )
{ {
+1 -1
View File
@@ -78,7 +78,7 @@ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
* *
* This function returns TRUE if the_RWLock is NULL and FALSE otherwise. * This function returns TRUE if the_RWLock is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_RWLock_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_RWLock_Is_null (
POSIX_RWLock_Control *the_RWLock POSIX_RWLock_Control *the_RWLock
) )
{ {
@@ -81,7 +81,7 @@ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
* _POSIX_Semaphore_Is_null * _POSIX_Semaphore_Is_null
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_null (
POSIX_Semaphore_Control *the_semaphore POSIX_Semaphore_Control *the_semaphore
) )
{ {
+1 -1
View File
@@ -78,7 +78,7 @@ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get (
* *
* This function returns TRUE if the_spinlock is NULL and FALSE otherwise. * This function returns TRUE if the_spinlock is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Spinlock_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Spinlock_Is_null (
POSIX_Spinlock_Control *the_spinlock POSIX_Spinlock_Control *the_spinlock
) )
{ {
+1 -1
View File
@@ -87,7 +87,7 @@ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
* This function returns TRUE if the_timer is NULL and FALSE otherwise. * This function returns TRUE if the_timer is NULL and FALSE otherwise.
*/ */
RTEMS_INLINE_ROUTINE boolean _POSIX_Timer_Is_null ( RTEMS_INLINE_ROUTINE bool _POSIX_Timer_Is_null (
POSIX_Timer_Control *the_timer POSIX_Timer_Control *the_timer
) )
{ {
+2 -2
View File
@@ -37,7 +37,7 @@ int pthread_cancel(
Thread_Control *the_thread; Thread_Control *the_thread;
POSIX_API_Control *thread_support; POSIX_API_Control *thread_support;
Objects_Locations location; Objects_Locations location;
boolean cancel = FALSE; bool cancel = false;
/* /*
* Don't even think about deleting a resource from an ISR. * 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 && if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS) thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS)
cancel = TRUE; cancel = true;
_Thread_Enable_dispatch(); _Thread_Enable_dispatch();
if ( cancel ) if ( cancel )
+1 -1
View File
@@ -34,7 +34,7 @@
int _POSIX_Condition_variables_Signal_support( int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond, pthread_cond_t *cond,
boolean is_broadcast bool is_broadcast
) )
{ {
register POSIX_Condition_variables_Control *the_cond; register POSIX_Condition_variables_Control *the_cond;
+1 -1
View File
@@ -40,7 +40,7 @@ int pthread_cond_timedwait(
) )
{ {
Watchdog_Interval ticks; Watchdog_Interval ticks;
boolean already_timedout; bool already_timedout;
/* /*
* POSIX requires that blocking calls with timeouts that take * POSIX requires that blocking calls with timeouts that take
+1 -1
View File
@@ -36,7 +36,7 @@ int _POSIX_Condition_variables_Wait_support(
pthread_cond_t *cond, pthread_cond_t *cond,
pthread_mutex_t *mutex, pthread_mutex_t *mutex,
Watchdog_Interval timeout, Watchdog_Interval timeout,
boolean already_timedout bool already_timedout
) )
{ {
register POSIX_Condition_variables_Control *the_cond; register POSIX_Condition_variables_Control *the_cond;
+1 -1
View File
@@ -41,7 +41,7 @@ void _POSIX_Keys_Run_destructors(
uint32_t thread_index; uint32_t thread_index;
uint32_t thread_api; uint32_t thread_api;
uint32_t iterations; uint32_t iterations;
boolean are_all_null; bool are_all_null;
POSIX_Keys_Control *the_key; POSIX_Keys_Control *the_key;
void *value; void *value;
+1 -1
View File
@@ -296,7 +296,7 @@ int killinfo(
process_it: 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 * Returns TRUE if the signal was synchronously given to a thread
+2 -2
View File
@@ -51,7 +51,7 @@ ssize_t _POSIX_Message_queue_Receive_support(
char *msg_ptr, char *msg_ptr,
size_t msg_len, size_t msg_len,
unsigned int *msg_prio, unsigned int *msg_prio,
boolean wait, bool wait,
Watchdog_Interval timeout Watchdog_Interval timeout
) )
{ {
@@ -59,7 +59,7 @@ ssize_t _POSIX_Message_queue_Receive_support(
POSIX_Message_queue_Control_fd *the_mq_fd; POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location; Objects_Locations location;
size_t length_out; size_t length_out;
boolean do_wait; bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) { switch ( location ) {
+2 -2
View File
@@ -50,7 +50,7 @@ int _POSIX_Message_queue_Send_support(
const char *msg_ptr, const char *msg_ptr,
size_t msg_len, size_t msg_len,
uint32_t msg_prio, uint32_t msg_prio,
boolean wait, bool wait,
Watchdog_Interval timeout Watchdog_Interval timeout
) )
{ {
@@ -58,7 +58,7 @@ int _POSIX_Message_queue_Send_support(
POSIX_Message_queue_Control_fd *the_mq_fd; POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location; Objects_Locations location;
CORE_message_queue_Status msg_status; CORE_message_queue_Status msg_status;
boolean do_wait; bool do_wait;
/* /*
* Validate the priority. * Validate the priority.
+1 -1
View File
@@ -57,7 +57,7 @@ ssize_t mq_timedreceive(
) )
{ {
Watchdog_Interval ticks; Watchdog_Interval ticks;
boolean do_wait; bool do_wait;
/* /*
* POSIX requires that blocking calls with timeouts that take * POSIX requires that blocking calls with timeouts that take
+1 -1
View File
@@ -57,7 +57,7 @@ int mq_timedsend(
) )
{ {
Watchdog_Interval ticks; Watchdog_Interval ticks;
boolean do_wait; bool do_wait;
/* /*
* POSIX requires that blocking calls with timeouts that take * POSIX requires that blocking calls with timeouts that take
+1 -1
View File
@@ -36,7 +36,7 @@
int _POSIX_Mutex_Lock_support( int _POSIX_Mutex_Lock_support(
pthread_mutex_t *mutex, pthread_mutex_t *mutex,
boolean blocking, bool blocking,
Watchdog_Interval timeout Watchdog_Interval timeout
) )
{ {
+1 -1
View File
@@ -43,7 +43,7 @@ int pthread_mutex_timedlock(
) )
{ {
Watchdog_Interval ticks; Watchdog_Interval ticks;
boolean do_wait; bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status; POSIX_Absolute_timeout_conversion_results_t status;
int lock_status; int lock_status;
+1 -1
View File
@@ -43,7 +43,7 @@ int pthread_rwlock_timedrdlock(
POSIX_RWLock_Control *the_rwlock; POSIX_RWLock_Control *the_rwlock;
Objects_Locations location; Objects_Locations location;
Watchdog_Interval ticks; Watchdog_Interval ticks;
boolean do_wait; bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status; POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock ) if ( !rwlock )
+1 -1
View File
@@ -43,7 +43,7 @@ int pthread_rwlock_timedwrlock(
POSIX_RWLock_Control *the_rwlock; POSIX_RWLock_Control *the_rwlock;
Objects_Locations location; Objects_Locations location;
Watchdog_Interval ticks; Watchdog_Interval ticks;
boolean do_wait; bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status; POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock ) if ( !rwlock )
+4 -4
View File
@@ -131,10 +131,10 @@ void _POSIX_signals_Post_switch_extension(
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart; goto restart;
if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) if ( _POSIX_signals_Check_signal( api, signo, true ) )
goto restart; goto restart;
} }
@@ -143,10 +143,10 @@ void _POSIX_signals_Post_switch_extension(
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart; goto restart;
if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) if ( _POSIX_signals_Check_signal( api, signo, true ) )
goto restart; goto restart;
} }
+6 -6
View File
@@ -36,18 +36,18 @@
* _POSIX_signals_Check_signal * _POSIX_signals_Check_signal
*/ */
boolean _POSIX_signals_Check_signal( bool _POSIX_signals_Check_signal(
POSIX_API_Control *api, POSIX_API_Control *api,
int signo, int signo,
boolean is_global bool is_global
) )
{ {
siginfo_t siginfo_struct; siginfo_t siginfo_struct;
sigset_t saved_signals_blocked; sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
is_global, TRUE ) ) is_global, true ) )
return FALSE; return false;
/* /*
* Since we made a union of these, only one test is necessary but this is * 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. * Just to prevent sending a signal which is currently being ignored.
*/ */
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
return FALSE; return false;
/* /*
* Block the signals requested in sa_mask * Block the signals requested in sa_mask
@@ -91,5 +91,5 @@ boolean _POSIX_signals_Check_signal(
*/ */
api->signals_blocked = saved_signals_blocked; api->signals_blocked = saved_signals_blocked;
return TRUE; return true;
} }
+8 -8
View File
@@ -34,23 +34,23 @@
* _POSIX_signals_Clear_signals * _POSIX_signals_Clear_signals
*/ */
boolean _POSIX_signals_Clear_signals( bool _POSIX_signals_Clear_signals(
POSIX_API_Control *api, POSIX_API_Control *api,
int signo, int signo,
siginfo_t *info, siginfo_t *info,
boolean is_global, bool is_global,
boolean check_blocked bool check_blocked
) )
{ {
sigset_t mask; sigset_t mask;
sigset_t signals_blocked; sigset_t signals_blocked;
ISR_Level level; ISR_Level level;
boolean do_callout; bool do_callout;
POSIX_signals_Siginfo_node *psiginfo; POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo ); mask = signo_to_mask( signo );
do_callout = FALSE; do_callout = false;
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked. * insures that no signals are blocked and all are checked.
@@ -79,15 +79,15 @@ boolean _POSIX_signals_Clear_signals(
&psiginfo->Node &psiginfo->Node
); );
} else } else
do_callout = FALSE; do_callout = false;
} else } else
_POSIX_signals_Clear_process_signals( mask ); _POSIX_signals_Clear_process_signals( mask );
do_callout = TRUE; do_callout = true;
} }
} else { } else {
if ( mask & (api->signals_pending & signals_blocked) ) { if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask; api->signals_pending &= ~mask;
do_callout = TRUE; do_callout = true;
} }
} }
_ISR_Enable( level ); _ISR_Enable( level );
+5 -6
View File
@@ -36,7 +36,7 @@
*/ */
/* XXX this routine could probably be cleaned up */ /* XXX this routine could probably be cleaned up */
boolean _POSIX_signals_Unblock_thread( bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread, Thread_Control *the_thread,
int signo, int signo,
siginfo_t *info siginfo_t *info
@@ -70,14 +70,14 @@ boolean _POSIX_signals_Unblock_thread(
} }
_Thread_queue_Extract_with_proxy( the_thread ); _Thread_queue_Extract_with_proxy( the_thread );
return TRUE; return true;
} }
/* /*
* This should only be reached via pthread_kill(). * 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. * + 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 ) { if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
the_thread->Wait.return_code = EINTR; the_thread->Wait.return_code = EINTR;
@@ -123,6 +123,5 @@ boolean _POSIX_signals_Unblock_thread(
_ISR_Signals_to_thread_executing = TRUE; _ISR_Signals_to_thread_executing = TRUE;
} }
} }
return FALSE; return false;
} }
+3 -3
View File
@@ -136,7 +136,7 @@ void _POSIX_Threads_Sporadic_budget_callout(
* XXX * XXX
*/ */
boolean _POSIX_Threads_Create_extension( bool _POSIX_Threads_Create_extension(
Thread_Control *executing, Thread_Control *executing,
Thread_Control *created Thread_Control *created
) )
@@ -147,7 +147,7 @@ boolean _POSIX_Threads_Create_extension(
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
if ( !api ) if ( !api )
return FALSE; return false;
created->API_Extensions[ THREAD_API_POSIX ] = api; created->API_Extensions[ THREAD_API_POSIX ] = api;
@@ -196,7 +196,7 @@ boolean _POSIX_Threads_Create_extension(
created created
); );
return TRUE; return true;
} }
/*PAGE /*PAGE
+3 -3
View File
@@ -47,8 +47,8 @@ int pthread_create(
Priority_Control core_priority; Priority_Control core_priority;
Thread_CPU_budget_algorithms budget_algorithm; Thread_CPU_budget_algorithms budget_algorithm;
Thread_CPU_budget_algorithm_callout budget_callout; Thread_CPU_budget_algorithm_callout budget_callout;
boolean is_fp; bool is_fp;
boolean status; bool status;
Thread_Control *the_thread; Thread_Control *the_thread;
POSIX_API_Control *api; POSIX_API_Control *api;
int schedpolicy = SCHED_RR; int schedpolicy = SCHED_RR;
@@ -231,7 +231,7 @@ int pthread_create(
* NOTE: Since the thread starts with all unblocked, this is necessary. * 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. * POSIX threads are allocated and started in one operation.
+1 -1
View File
@@ -63,7 +63,7 @@ int pthread_kill(
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); (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 ) ) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = TRUE; _ISR_Signals_to_thread_executing = TRUE;
+1 -1
View File
@@ -65,7 +65,7 @@ int pthread_sigmask(
if ( ~api->signals_blocked & if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) { (api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = TRUE; _Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch(); _Thread_Dispatch();
} }
+1 -1
View File
@@ -34,7 +34,7 @@
int _POSIX_Semaphore_Wait_support( int _POSIX_Semaphore_Wait_support(
sem_t *sem, sem_t *sem,
boolean blocking, bool blocking,
Watchdog_Interval timeout Watchdog_Interval timeout
) )
{ {
+3 -3
View File
@@ -40,7 +40,7 @@ int sem_timedwait(
) )
{ {
Watchdog_Interval ticks; Watchdog_Interval ticks;
boolean do_wait = TRUE; bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status; POSIX_Absolute_timeout_conversion_results_t status;
int lock_status; int lock_status;
@@ -58,10 +58,10 @@ int sem_timedwait(
case POSIX_ABSOLUTE_TIMEOUT_INVALID: case POSIX_ABSOLUTE_TIMEOUT_INVALID:
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
do_wait = FALSE; do_wait = false;
break; break;
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE; do_wait = true;
break; break;
} }
+2 -2
View File
@@ -36,7 +36,7 @@ int pthread_setcancelstate(
) )
{ {
POSIX_API_Control *thread_support; POSIX_API_Control *thread_support;
boolean cancel = FALSE; bool cancel = false;
/* /*
* Don't even think about deleting a resource from an ISR. * 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 && if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) thread_support->cancelation_requested )
cancel = TRUE; cancel = true;
_Thread_Enable_dispatch(); _Thread_Enable_dispatch();
if ( cancel ) if ( cancel )
+2 -2
View File
@@ -36,7 +36,7 @@ int pthread_setcanceltype(
) )
{ {
POSIX_API_Control *thread_support; POSIX_API_Control *thread_support;
boolean cancel = FALSE; bool cancel = false;
/* /*
* Don't even think about deleting a resource from an ISR. * 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 && if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) thread_support->cancelation_requested )
cancel = TRUE; cancel = true;
_Thread_Enable_dispatch(); _Thread_Enable_dispatch();
if ( cancel ) if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
+4 -4
View File
@@ -104,8 +104,8 @@ int sigtimedwait(
api, api,
the_info->si_signo, the_info->si_signo,
the_info, the_info,
FALSE, false,
FALSE false
); );
_ISR_Enable( level ); _ISR_Enable( level );
@@ -118,7 +118,7 @@ int sigtimedwait(
if ( *set & _POSIX_signals_Pending ) { if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _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 ); _ISR_Enable( level );
the_info->si_signo = signo; the_info->si_signo = signo;
@@ -144,7 +144,7 @@ int sigtimedwait(
* the signal. * 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; errno = _Thread_Executing->Wait.return_code;
return the_info->si_signo; return the_info->si_signo;
} }
+2 -2
View File
@@ -33,7 +33,7 @@
void pthread_testcancel( void ) void pthread_testcancel( void )
{ {
POSIX_API_Control *thread_support; POSIX_API_Control *thread_support;
boolean cancel = FALSE; bool cancel = false;
/* /*
* Don't even think about deleting a resource from an ISR. * Don't even think about deleting a resource from an ISR.
@@ -49,7 +49,7 @@ void pthread_testcancel( void )
_Thread_Disable_dispatch(); _Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested ) thread_support->cancelation_requested )
cancel = TRUE; cancel = true;
_Thread_Enable_dispatch(); _Thread_Enable_dispatch();
if ( cancel ) if ( cancel )
+3 -3
View File
@@ -24,7 +24,7 @@
#include <rtems/posix/timer.h> #include <rtems/posix/timer.h>
#include <rtems/posix/ptimer.h> #include <rtems/posix/ptimer.h>
boolean _POSIX_Timer_Insert_helper( bool _POSIX_Timer_Insert_helper(
Watchdog_Control *timer, Watchdog_Control *timer,
Watchdog_Interval ticks, Watchdog_Interval ticks,
Objects_Id id, Objects_Id id,
@@ -43,7 +43,7 @@ boolean _POSIX_Timer_Insert_helper(
*/ */
if ( timer->state != WATCHDOG_INACTIVE ) { if ( timer->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level ); _ISR_Enable( level );
return FALSE; return false;
} }
/* /*
@@ -53,5 +53,5 @@ boolean _POSIX_Timer_Insert_helper(
_Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks ); _Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level ); _ISR_Enable( level );
return TRUE; return true;
} }
+1 -1
View File
@@ -35,7 +35,7 @@ int timer_settime(
{ {
POSIX_Timer_Control *ptimer; POSIX_Timer_Control *ptimer;
Objects_Locations location; Objects_Locations location;
boolean activated; bool activated;
uint32_t initial_period; uint32_t initial_period;
struct itimerspec normalize; struct itimerspec normalize;

Some files were not shown because too many files have changed in this diff Show More