From 874297f3bea7761cf05ae26540b7a9e21d4a6e1d Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 16 Apr 2004 10:01:03 +0000 Subject: Remove stray white spaces. --- cpukit/posix/include/aio.h | 4 +- cpukit/posix/include/intr.h | 4 +- cpukit/posix/include/mqueue.h | 4 +- cpukit/posix/include/rtems/posix/cond.h | 36 +++--- cpukit/posix/include/rtems/posix/intr.h | 46 +++---- cpukit/posix/include/rtems/posix/key.h | 32 ++--- cpukit/posix/include/rtems/posix/mqueue.h | 44 +++---- cpukit/posix/include/rtems/posix/mutex.h | 32 ++--- cpukit/posix/include/rtems/posix/posixapi.h | 6 +- cpukit/posix/include/rtems/posix/priority.h | 2 +- cpukit/posix/include/rtems/posix/psignal.h | 2 +- cpukit/posix/include/rtems/posix/pthread.h | 32 ++--- cpukit/posix/include/rtems/posix/semaphore.h | 30 ++--- cpukit/posix/include/rtems/posix/threadsup.h | 4 +- cpukit/posix/include/rtems/posix/time.h | 6 +- cpukit/posix/include/sched.h | 2 +- cpukit/posix/src/adasupp.c | 6 +- cpukit/posix/src/adjtime.c | 12 +- cpukit/posix/src/aio.c | 2 +- cpukit/posix/src/alarm.c | 2 +- cpukit/posix/src/cancel.c | 6 +- cpukit/posix/src/cancelrun.c | 12 +- cpukit/posix/src/cleanuppop.c | 10 +- cpukit/posix/src/cleanuppush.c | 6 +- cpukit/posix/src/clockgetres.c | 8 +- cpukit/posix/src/clockgettime.c | 8 +- cpukit/posix/src/clocksettime.c | 14 +- cpukit/posix/src/cond.c | 6 +- cpukit/posix/src/condattrdestroy.c | 4 +- cpukit/posix/src/condattrgetpshared.c | 4 +- cpukit/posix/src/condattrinit.c | 4 +- cpukit/posix/src/condattrsetpshared.c | 4 +- cpukit/posix/src/condbroadcast.c | 2 +- cpukit/posix/src/conddefaultattributes.c | 2 +- cpukit/posix/src/conddestroy.c | 18 +-- cpukit/posix/src/condinit.c | 28 ++-- cpukit/posix/src/condsignal.c | 2 +- cpukit/posix/src/condsignalsupp.c | 8 +- cpukit/posix/src/condtimedwait.c | 4 +- cpukit/posix/src/condwait.c | 2 +- cpukit/posix/src/condwaitsupp.c | 14 +- cpukit/posix/src/execl.c | 2 +- cpukit/posix/src/execle.c | 2 +- cpukit/posix/src/execlp.c | 2 +- cpukit/posix/src/execv.c | 2 +- cpukit/posix/src/execve.c | 2 +- cpukit/posix/src/execvp.c | 2 +- cpukit/posix/src/fork.c | 2 +- cpukit/posix/src/intr.c | 52 ++++---- cpukit/posix/src/key.c | 2 +- cpukit/posix/src/keycreate.c | 12 +- cpukit/posix/src/keydelete.c | 2 +- cpukit/posix/src/keygetspecific.c | 2 +- cpukit/posix/src/keyrundestructors.c | 8 +- cpukit/posix/src/keysetspecific.c | 2 +- cpukit/posix/src/killinfo.c | 24 ++-- cpukit/posix/src/mqueue.c | 6 +- cpukit/posix/src/mqueueclose.c | 6 +- cpukit/posix/src/mqueuecreatesupp.c | 26 ++-- cpukit/posix/src/mqueuedeletesupp.c | 16 +-- cpukit/posix/src/mqueuegetattr.c | 12 +- cpukit/posix/src/mqueuenametoid.c | 6 +- cpukit/posix/src/mqueuenotify.c | 10 +- cpukit/posix/src/mqueueopen.c | 28 ++-- cpukit/posix/src/mqueuereceive.c | 4 +- cpukit/posix/src/mqueuerecvsupp.c | 12 +- cpukit/posix/src/mqueuesend.c | 6 +- cpukit/posix/src/mqueuesendsupp.c | 12 +- cpukit/posix/src/mqueuesetattr.c | 8 +- cpukit/posix/src/mqueuetimedreceive.c | 4 +- cpukit/posix/src/mqueuetimedsend.c | 4 +- cpukit/posix/src/mqueuetranslatereturncode.c | 6 +- cpukit/posix/src/mqueueunlink.c | 10 +- cpukit/posix/src/mutex.c | 2 +- cpukit/posix/src/mutexattrgetprioceiling.c | 2 +- cpukit/posix/src/mutexattrgetprotocol.c | 2 +- cpukit/posix/src/mutexattrsetprioceiling.c | 2 +- cpukit/posix/src/mutexattrsetprotocol.c | 4 +- cpukit/posix/src/mutexdefaultattributes.c | 2 +- cpukit/posix/src/mutexdestroy.c | 14 +- cpukit/posix/src/mutexinit.c | 16 +-- cpukit/posix/src/mutexlock.c | 2 +- cpukit/posix/src/mutexlocksupp.c | 2 +- cpukit/posix/src/mutexsetprioceiling.c | 2 +- cpukit/posix/src/mutextimedlock.c | 4 +- cpukit/posix/src/mutextrylock.c | 2 +- cpukit/posix/src/mutexunlock.c | 6 +- cpukit/posix/src/nanosleep.c | 14 +- cpukit/posix/src/posixintervaltotimespec.c | 4 +- cpukit/posix/src/posixtimespecsubtract.c | 6 +- cpukit/posix/src/posixtimespectointerval.c | 4 +- cpukit/posix/src/psignal.c | 14 +- cpukit/posix/src/psignalchecksignal.c | 6 +- cpukit/posix/src/psignalclearsignals.c | 12 +- cpukit/posix/src/psignalsetprocesssignals.c | 4 +- cpukit/posix/src/psignalunblockthread.c | 4 +- cpukit/posix/src/pthread.c | 60 ++++----- cpukit/posix/src/pthreadatfork.c | 2 +- cpukit/posix/src/pthreadcreate.c | 28 ++-- cpukit/posix/src/pthreadkill.c | 2 +- cpukit/posix/src/pthreadsetschedparam.c | 20 +-- cpukit/posix/src/pthreadsigmask.c | 4 +- cpukit/posix/src/ptimer.c | 6 +- cpukit/posix/src/ptimer1.c | 186 +++++++++++++-------------- cpukit/posix/src/sched.c | 6 +- cpukit/posix/src/semaphore.c | 2 +- cpukit/posix/src/semaphorecreatesupp.c | 28 ++-- cpukit/posix/src/semaphoredeletesupp.c | 2 +- cpukit/posix/src/semaphorenametoid.c | 2 +- cpukit/posix/src/semaphorewaitsupp.c | 2 +- cpukit/posix/src/semclose.c | 6 +- cpukit/posix/src/semdestroy.c | 4 +- cpukit/posix/src/semgetvalue.c | 2 +- cpukit/posix/src/seminit.c | 4 +- cpukit/posix/src/semopen.c | 18 +-- cpukit/posix/src/sempost.c | 2 +- cpukit/posix/src/semunlink.c | 6 +- cpukit/posix/src/setcancelstate.c | 12 +- cpukit/posix/src/setcanceltype.c | 10 +- cpukit/posix/src/sigaction.c | 8 +- cpukit/posix/src/sigtimedwait.c | 6 +- cpukit/posix/src/testcancel.c | 4 +- cpukit/posix/src/time.c | 2 +- cpukit/posix/src/ualarm.c | 4 +- cpukit/posix/src/wait.c | 2 +- cpukit/posix/src/waitpid.c | 2 +- 126 files changed, 670 insertions(+), 670 deletions(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/include/aio.h b/cpukit/posix/include/aio.h index 8fc18a59f2..cc9b17a5b4 100644 --- a/cpukit/posix/include/aio.h +++ b/cpukit/posix/include/aio.h @@ -15,7 +15,7 @@ extern "C" { #if defined(_POSIX_ASYNCHRONOUS_IO) /* - * 6.7.1 Data Definitions for Asynchronous Input and Output, + * 6.7.1 Data Definitions for Asynchronous Input and Output, * P1003.1b-1993, p. 151 */ @@ -95,7 +95,7 @@ int aio_error( ); /* - * 6.7.6 Retrieve Return Status of Asynchronous I/O Operation, + * 6.7.6 Retrieve Return Status of Asynchronous I/O Operation, * P1003.1b-1993, p. 162 */ diff --git a/cpukit/posix/include/intr.h b/cpukit/posix/include/intr.h index 48aaf64160..1464f68b1e 100644 --- a/cpukit/posix/include/intr.h +++ b/cpukit/posix/include/intr.h @@ -56,11 +56,11 @@ int intr_release( int intr_lock( intr_t intr ); - + int intr_unlock( intr_t intr ); - + /* * 22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76 */ diff --git a/cpukit/posix/include/mqueue.h b/cpukit/posix/include/mqueue.h index 8d117862ea..0b1b834f82 100644 --- a/cpukit/posix/include/mqueue.h +++ b/cpukit/posix/include/mqueue.h @@ -68,7 +68,7 @@ int mq_send( mqd_t mqdes, const char *msg_ptr, size_t msg_len, - unsigned int msg_prio + unsigned int msg_prio ); #if defined(_POSIX_TIMEOUTS) @@ -113,7 +113,7 @@ int mq_timedreceive( /* XXX: should this be ssize_t */ #if defined(_POSIX_REALTIME_SIGNALS) /* - * 15.2.6 Notify Process that a Message is Available on a Queue, + * 15.2.6 Notify Process that a Message is Available on a Queue, * P1003.1b-1993, p. 280 */ diff --git a/cpukit/posix/include/rtems/posix/cond.h b/cpukit/posix/include/rtems/posix/cond.h index 433a063f0c..c283b84b08 100644 --- a/cpukit/posix/include/rtems/posix/cond.h +++ b/cpukit/posix/include/rtems/posix/cond.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __RTEMS_POSIX_CONDITION_VARIABLES_h #define __RTEMS_POSIX_CONDITION_VARIABLES_h - + #ifdef __cplusplus extern "C" { #endif @@ -33,7 +33,7 @@ extern "C" { /* * Data Structure used to manage a POSIX condition variable */ - + typedef struct { Objects_Control Object; int process_shared; @@ -45,7 +45,7 @@ typedef struct { * The following defines the information control block used to manage * this class of objects. */ - + POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; /* @@ -53,7 +53,7 @@ POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; */ extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes; - + /* * _POSIX_Condition_variables_Manager_initialization * @@ -61,11 +61,11 @@ extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes; * * This routine performs the initialization necessary for this manager. */ - + void _POSIX_Condition_variables_Manager_initialization( uint32_t maximum_condition_variables ); - + /* * _POSIX_Condition_variables_Allocate * @@ -74,10 +74,10 @@ void _POSIX_Condition_variables_Manager_initialization( * This function allocates a condition variable control block from * the inactive chain of free condition variable control blocks. */ - -RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * + +RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * _POSIX_Condition_variables_Allocate( void ); - + /* * _POSIX_Condition_variables_Free * @@ -86,17 +86,17 @@ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * * This routine frees a condition variable control block to the * inactive chain of free condition variable control blocks. */ - + RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ); - + /* * _POSIX_Condition_variables_Get * * DESCRIPTION: * - * This function maps condition variable IDs to condition variable control + * This function maps condition variable IDs to condition variable control * blocks. If ID corresponds to a local condition variable, then it returns * the_condition variable control pointer which maps to ID and location * is set to OBJECTS_LOCAL. if the condition variable ID is global and @@ -104,23 +104,23 @@ RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( * and the_condition variable is undefined. Otherwise, location is set * to OBJECTS_ERROR and the_condition variable is undefined. */ - + #if 0 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( Objects_Id *id, Objects_Locations *location ); #endif - + /* * _POSIX_Condition_variables_Is_null * * DESCRIPTION: * - * This function returns TRUE if the_condition variable is NULL + * This function returns TRUE if the_condition variable is NULL * and FALSE otherwise. */ - + RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null ( POSIX_Condition_variables_Control *the_condition_variable ); @@ -163,6 +163,6 @@ int _POSIX_Condition_variables_Wait_support( #ifdef __cplusplus } #endif - + #endif /* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/intr.h b/cpukit/posix/include/rtems/posix/intr.h index 8768887215..f6f63a4797 100644 --- a/cpukit/posix/include/rtems/posix/intr.h +++ b/cpukit/posix/include/rtems/posix/intr.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __RTEMS_POSIX_KEY_h #define __RTEMS_POSIX_KEY_h - + #ifdef __cplusplus extern "C" { #endif @@ -33,15 +33,15 @@ typedef struct { int deferred_count; Chain_Control Handlers; } POSIX_Interrupt_Control; - + /* * Data Structure used to manage a POSIX Interrupt Handler */ - + typedef struct { Objects_Control Object; - int is_active; - intr_t vector; + int is_active; + intr_t vector; Thread_Control *server; int (*handler)( void *area ); volatile void *user_data_area; @@ -51,7 +51,7 @@ typedef struct { * The following defines the information control block used to manage * this class of objects. */ - + POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; /* @@ -59,9 +59,9 @@ POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; * interrupt handlers installed on each vector. */ -POSIX_EXTERN POSIX_Interrupt_Control +POSIX_EXTERN POSIX_Interrupt_Control _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; - + /* * _POSIX_Interrupt_Manager_initialization * @@ -69,11 +69,11 @@ POSIX_EXTERN POSIX_Interrupt_Control * * This routine performs the initialization necessary for this manager. */ - -void _POSIX_Interrupt_Manager_initialization( + +void _POSIX_Interrupt_Manager_initialization( uint32_t maximum_interrupt_handlers ); - + /* * _POSIX_Interrupt_Allocate * @@ -82,10 +82,10 @@ void _POSIX_Interrupt_Manager_initialization( * This function allocates a interrupt handler control block from * the inactive chain of free interrupt handler control blocks. */ - + RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control * _POSIX_Interrupt_Allocate( void ); - + /* * _POSIX_Interrupt_Free * @@ -94,17 +94,17 @@ RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control * * This routine frees a interrupt handler control block to the * inactive chain of free interrupt handler control blocks. */ - + RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free ( POSIX_Interrupt_Handler_control *the_intr ); - + /* * _POSIX_Interrupt_Get * * DESCRIPTION: * - * This function maps interrupt handler IDs to interrupt handler control + * This function maps interrupt handler IDs to interrupt handler control * blocks. If ID corresponds to a local interrupt handler, then it returns * the_intr control pointer which maps to ID and location * is set to OBJECTS_LOCAL. if the interrupt handler ID is global and @@ -112,12 +112,12 @@ RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free ( * and the_intr is undefined. Otherwise, location is set * to OBJECTS_ERROR and the_intr is undefined. */ - + RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get ( Objects_Id id, Objects_Locations *location ); - + /* * _POSIX_Interrupt_Is_null * @@ -125,11 +125,11 @@ RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get ( * * This function returns TRUE if the_intr is NULL and FALSE otherwise. */ - + RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null ( POSIX_Interrupt_Handler_control *the_intr ); - + /* * _POSIX_Interrupt_Handler * @@ -137,7 +137,7 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null ( * * This function XXX. */ - + void _POSIX_Interrupt_Handler( ISR_Vector_number vector ); @@ -147,6 +147,6 @@ void _POSIX_Interrupt_Handler( #ifdef __cplusplus } #endif - + #endif /* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h index 1f6bf3bb86..be9c9579f1 100644 --- a/cpukit/posix/include/rtems/posix/key.h +++ b/cpukit/posix/include/rtems/posix/key.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __RTEMS_POSIX_KEY_h #define __RTEMS_POSIX_KEY_h - + #ifdef __cplusplus extern "C" { #endif @@ -26,7 +26,7 @@ extern "C" { * NOTE: The Values is a table indexed by the index portion of the * ID of the currently executing thread. */ - + typedef struct { Objects_Control Object; boolean is_active; @@ -38,9 +38,9 @@ typedef struct { * The following defines the information control block used to manage * this class of objects. */ - + POSIX_EXTERN Objects_Information _POSIX_Keys_Information; - + /* * _POSIX_Keys_Manager_initialization * @@ -48,11 +48,11 @@ POSIX_EXTERN Objects_Information _POSIX_Keys_Information; * * This routine performs the initialization necessary for this manager. */ - + void _POSIX_Key_Manager_initialization( uint32_t maximum_keys ); - + /* * _POSIX_Keys_Run_destructors * @@ -64,7 +64,7 @@ void _POSIX_Key_Manager_initialization( * NOTE: This is the routine executed when a thread exits to * run through all the keys and do the destructor action. */ - + void _POSIX_Keys_Run_destructors( Thread_Control *thread ); @@ -77,9 +77,9 @@ void _POSIX_Keys_Run_destructors( * This function allocates a keys control block from * the inactive chain of free keys control blocks. */ - + RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ); - + /* * _POSIX_Keys_Free * @@ -88,11 +88,11 @@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ); * This routine frees a keys control block to the * inactive chain of free keys control blocks. */ - + RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ); - + /* * _POSIX_Keys_Get * @@ -106,12 +106,12 @@ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( * and the_key is undefined. Otherwise, location is set * to OBJECTS_ERROR and the_key is undefined. */ - + RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( Objects_Id id, Objects_Locations *location ); - + /* * _POSIX_Keys_Is_null * @@ -119,7 +119,7 @@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( * * This function returns TRUE if the_key is NULL and FALSE otherwise. */ - + RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( POSIX_Keys_Control *the_key ); @@ -129,6 +129,6 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( #ifdef __cplusplus } #endif - + #endif /* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/mqueue.h b/cpukit/posix/include/rtems/posix/mqueue.h index 1d8f5211e0..547091f313 100644 --- a/cpukit/posix/include/rtems/posix/mqueue.h +++ b/cpukit/posix/include/rtems/posix/mqueue.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __RTEMS_POSIX_MESSAGE_QUEUE_h #define __RTEMS_POSIX_MESSAGE_QUEUE_h - + #ifdef __cplusplus extern "C" { #endif @@ -28,7 +28,7 @@ extern "C" { /* * Data Structure used to manage a POSIX message queue */ - + typedef struct { Objects_Control Object; int process_shared; @@ -50,10 +50,10 @@ typedef struct { * this class of objects. The second item is used to manage the set * of "file descriptors" associated with the message queues. */ - + POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information; POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information_fds; - + /* * _POSIX_Message_queue_Manager_initialization * @@ -61,11 +61,11 @@ POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information_fds; * * This routine performs the initialization necessary for this manager. */ - + void _POSIX_Message_queue_Manager_initialization( uint32_t maximum_message_queues ); - + /* * * _POSIX_Message_queue_Create_support @@ -75,7 +75,7 @@ void _POSIX_Message_queue_Manager_initialization( * This routine performs the creation of a message queue utilizing the * core message queue. */ - + int _POSIX_Message_queue_Create_support( const char *name, int pshared, @@ -90,8 +90,8 @@ int _POSIX_Message_queue_Create_support( * * This routine supports the mq_unlink and mq_close routines by * doing most of the work involved with removing a message queue. - */ - + */ + void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ); @@ -136,9 +136,9 @@ int _POSIX_Message_queue_Send_support( * This function allocates a message queue control block from * the inactive chain of free message queue control blocks. */ - + RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ); - + /* * _POSIX_Message_queue_Free * @@ -147,11 +147,11 @@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( * This routine frees a message queue control block to the * inactive chain of free message queue control blocks. */ - + RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ); - + /* * _POSIX_Message_queue_Get * @@ -165,12 +165,12 @@ RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( * and the_message queue is undefined. Otherwise, location is set * to OBJECTS_ERROR and the_mq is undefined. */ - + RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ); - + /* * _POSIX_Message_queue_Is_null * @@ -178,7 +178,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. */ - + RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null ( POSIX_Message_queue_Control *the_mq ); @@ -199,24 +199,24 @@ int _POSIX_Message_queue_Name_to_id( /* * _POSIX_Message_queue_Priority_to_core - * + * * DESCRIPTION: * * XXX */ - + RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core( unsigned int priority ); /* * _POSIX_Message_queue_Priority_from_core - * + * * DESCRIPTION: * * XXX */ - + RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ); @@ -243,6 +243,6 @@ int _POSIX_Message_queue_Translate_core_message_queue_return_code( #ifdef __cplusplus } #endif - + #endif /* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/mutex.h b/cpukit/posix/include/rtems/posix/mutex.h index 510229cbc7..99911ac3c0 100644 --- a/cpukit/posix/include/rtems/posix/mutex.h +++ b/cpukit/posix/include/rtems/posix/mutex.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __RTEMS_POSIX_MUTEX_h #define __RTEMS_POSIX_MUTEX_h - + #ifdef __cplusplus extern "C" { #endif @@ -26,7 +26,7 @@ extern "C" { /* * Data Structure used to manage a POSIX mutex */ - + typedef struct { Objects_Control Object; int process_shared; @@ -37,7 +37,7 @@ typedef struct { * The following defines the information control block used to manage * this class of objects. */ - + POSIX_EXTERN Objects_Information _POSIX_Mutex_Information; /* @@ -45,7 +45,7 @@ POSIX_EXTERN Objects_Information _POSIX_Mutex_Information; */ extern const pthread_mutexattr_t _POSIX_Mutex_Default_attributes; - + /* * _POSIX_Mutex_Manager_initialization * @@ -53,11 +53,11 @@ extern const pthread_mutexattr_t _POSIX_Mutex_Default_attributes; * * This routine performs the initialization necessary for this manager. */ - + void _POSIX_Mutex_Manager_initialization( uint32_t maximum_mutexes ); - + /* * _POSIX_Mutex_Allocate * @@ -66,9 +66,9 @@ void _POSIX_Mutex_Manager_initialization( * This function allocates a mutexes control block from * the inactive chain of free mutexes control blocks. */ - + RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ); - + /* * _POSIX_Mutex_Free * @@ -77,11 +77,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ); * This routine frees a mutexes control block to the * inactive chain of free mutexes control blocks. */ - + RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ); - + #if 0 /* * _POSIX_Mutex_Get @@ -96,12 +96,12 @@ RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( * and the_mutex is undefined. Otherwise, location is set * to OBJECTS_ERROR and the_mutex is undefined. */ - + RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get ( Objects_Id *id, Objects_Locations *location ); - + /* * _POSIX_Mutex_Is_null * @@ -109,7 +109,7 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get ( * * This function returns TRUE if the_mutex is NULL and FALSE otherwise. */ - + RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null ( POSIX_Mutex_Control *the_mutex ); @@ -119,7 +119,7 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null ( * _POSIX_Mutex_Lock_support * * DESCRIPTION: - * + * * A support routine which implements guts of the blocking, non-blocking, and * timed wait version of mutex lock. */ @@ -152,6 +152,6 @@ int _POSIX_Mutex_From_core_mutex_status( #ifdef __cplusplus } #endif - + #endif /* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/posixapi.h b/cpukit/posix/include/rtems/posix/posixapi.h index 7545d440bb..81fd227538 100644 --- a/cpukit/posix/include/rtems/posix/posixapi.h +++ b/cpukit/posix/include/rtems/posix/posixapi.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __POSIX_API_h #define __POSIX_API_h - + #include /*PAGE @@ -24,7 +24,7 @@ * * XXX */ - + void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ); diff --git a/cpukit/posix/include/rtems/posix/priority.h b/cpukit/posix/include/rtems/posix/priority.h index c0253f3bab..bb4b9cfb19 100644 --- a/cpukit/posix/include/rtems/posix/priority.h +++ b/cpukit/posix/include/rtems/posix/priority.h @@ -24,7 +24,7 @@ */ #define POSIX_SCHEDULER_MAXIMUM_PRIORITY (254) - + #define POSIX_SCHEDULER_MINIMUM_PRIORITY (1) RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid( diff --git a/cpukit/posix/include/rtems/posix/psignal.h b/cpukit/posix/include/rtems/posix/psignal.h index c15ca78d34..905b243e50 100644 --- a/cpukit/posix/include/rtems/posix/psignal.h +++ b/cpukit/posix/include/rtems/posix/psignal.h @@ -74,7 +74,7 @@ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ); -boolean _POSIX_signals_Unblock_thread( +boolean _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info diff --git a/cpukit/posix/include/rtems/posix/pthread.h b/cpukit/posix/include/rtems/posix/pthread.h index a1fbdc0acd..9a5ff96923 100644 --- a/cpukit/posix/include/rtems/posix/pthread.h +++ b/cpukit/posix/include/rtems/posix/pthread.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __RTEMS_POSIX_THREADS_h #define __RTEMS_POSIX_THREADS_h - + #ifdef __cplusplus extern "C" { #endif @@ -29,19 +29,19 @@ extern "C" { * The following defines the information control block used to manage * this class of objects. */ - + POSIX_EXTERN Objects_Information _POSIX_Threads_Information; /* * These are used to manage the user initialization threads. */ - -POSIX_EXTERN posix_initialization_threads_table + +POSIX_EXTERN posix_initialization_threads_table *_POSIX_Threads_User_initialization_threads; POSIX_EXTERN uint32_t _POSIX_Threads_Number_of_initialization_threads; extern const pthread_attr_t _POSIX_Threads_Default_attributes; - + /* * _POSIX_Threads_Manager_initialization * @@ -49,13 +49,13 @@ extern const pthread_attr_t _POSIX_Threads_Default_attributes; * * This routine performs the initialization necessary for this manager. */ - + void _POSIX_Threads_Manager_initialization( uint32_t maximum_pthreads, uint32_t number_of_initialization_threads, posix_initialization_threads_table *user_threads ); - + /* * _POSIX_Threads_Allocate * @@ -64,9 +64,9 @@ void _POSIX_Threads_Manager_initialization( * This function allocates a pthread control block from * the inactive chain of free pthread control blocks. */ - + RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ); - + /* * _POSIX_Threads_Free * @@ -75,11 +75,11 @@ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ); * This routine frees a pthread control block to the * inactive chain of free pthread control blocks. */ - + RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free( Thread_Control *the_pthread ); - + /* * _POSIX_Threads_Get * @@ -93,12 +93,12 @@ RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free( * and the_pthread is undefined. Otherwise, location is set * to OBJECTS_ERROR and the_pthread is undefined. */ - + RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get( pthread_t id, Objects_Locations *location ); - + /* * _POSIX_Threads_Is_null * @@ -106,7 +106,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get( * * This function returns TRUE if the_pthread is NULL and FALSE otherwise. */ - + RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null( Thread_Control *the_pthread ); @@ -144,6 +144,6 @@ void _POSIX_Threads_Sporadic_budget_TSR( #ifdef __cplusplus } #endif - + #endif /* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/semaphore.h b/cpukit/posix/include/rtems/posix/semaphore.h index 1f30bc7e0a..4505efdf9d 100644 --- a/cpukit/posix/include/rtems/posix/semaphore.h +++ b/cpukit/posix/include/rtems/posix/semaphore.h @@ -12,10 +12,10 @@ * * $Id$ */ - + #ifndef __RTEMS_POSIX_SEMAPHORE_h #define __RTEMS_POSIX_SEMAPHORE_h - + #ifdef __cplusplus extern "C" { #endif @@ -28,7 +28,7 @@ extern "C" { /* * Data Structure used to manage a POSIX semaphore */ - + typedef struct { Objects_Control Object; int process_shared; @@ -42,9 +42,9 @@ typedef struct { * The following defines the information control block used to manage * this class of objects. */ - + POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; - + /* * _POSIX_Semaphore_Manager_initialization * @@ -52,11 +52,11 @@ POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; * * This routine performs the initialization necessary for this manager. */ - + void _POSIX_Semaphore_Manager_initialization( uint32_t maximum_semaphorees ); - + /* * _POSIX_Semaphore_Allocate * @@ -65,9 +65,9 @@ void _POSIX_Semaphore_Manager_initialization( * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ - + RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ); - + /* * _POSIX_Semaphore_Free * @@ -76,11 +76,11 @@ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ); * This routine frees a semaphore control block to the * inactive chain of free semaphore control blocks. */ - + RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ); - + /* * _POSIX_Semaphore_Get * @@ -94,12 +94,12 @@ RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( * and the_semaphore is undefined. Otherwise, location is set * to OBJECTS_ERROR and the_semaphore is undefined. */ - + RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ); - + /* * _POSIX_Semaphore_Is_null * @@ -107,7 +107,7 @@ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( * * This function returns TRUE if the_semaphore is NULL and FALSE otherwise. */ - + RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null ( POSIX_Semaphore_Control *the_semaphore ); @@ -175,6 +175,6 @@ int _POSIX_Semaphore_Name_to_id( #ifdef __cplusplus } #endif - + #endif /* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/threadsup.h b/cpukit/posix/include/rtems/posix/threadsup.h index 971675f41f..3cb25b3982 100644 --- a/cpukit/posix/include/rtems/posix/threadsup.h +++ b/cpukit/posix/include/rtems/posix/threadsup.h @@ -24,14 +24,14 @@ typedef struct { #if 0 /* - * POSIX Interrupts + * POSIX Interrupts */ uint32_t interrupts_installed; CORE_semaphore_Control Interrupt_Semaphore; #endif /* - * POSIX Cancelability + * POSIX Cancelability */ int cancelability_state; int cancelability_type; diff --git a/cpukit/posix/include/rtems/posix/time.h b/cpukit/posix/include/rtems/posix/time.h index 0e87db388e..83201ec784 100644 --- a/cpukit/posix/include/rtems/posix/time.h +++ b/cpukit/posix/include/rtems/posix/time.h @@ -13,7 +13,7 @@ * Seconds from January 1, 1970 to January 1, 1988. Used to account for * differences between POSIX API and RTEMS core. */ - + #define POSIX_TIME_SECONDS_1970_THROUGH_1988 \ (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ (4 * TOD_SECONDS_PER_DAY)) @@ -22,7 +22,7 @@ * * _POSIX_Timespec_subtract */ - + void _POSIX_Timespec_subtract( const struct timespec *the_start, const struct timespec *end, @@ -41,7 +41,7 @@ Watchdog_Interval _POSIX_Timespec_to_interval( * * _POSIX_Interval_to_timespec */ - + void _POSIX_Interval_to_timespec( Watchdog_Interval ticks, struct timespec *time diff --git a/cpukit/posix/include/sched.h b/cpukit/posix/include/sched.h index 18d4f1096d..964430b792 100644 --- a/cpukit/posix/include/sched.h +++ b/cpukit/posix/include/sched.h @@ -40,7 +40,7 @@ int sched_getparam( ); /* - * 13.3.3 Set Scheduling Policy and Scheduling Parameters, + * 13.3.3 Set Scheduling Policy and Scheduling Parameters, * P1003.1b-1993, p. 254 */ diff --git a/cpukit/posix/src/adasupp.c b/cpukit/posix/src/adasupp.c index f1caf80023..535ff669c2 100644 --- a/cpukit/posix/src/adasupp.c +++ b/cpukit/posix/src/adasupp.c @@ -5,7 +5,7 @@ #if HAVE_CONFIG_H #include "config.h" #endif - + #include #include #include @@ -21,12 +21,12 @@ * allocate enough stack for Ada tasks. */ -size_t _ada_pthread_minimum_stack_size( void ) +size_t _ada_pthread_minimum_stack_size( void ) { /* * Eventually this may need to include a per cpu family calculation * but for now, this will do. - */ + */ return PTHREAD_MINIMUM_STACK_SIZE * 2; } diff --git a/cpukit/posix/src/adjtime.c b/cpukit/posix/src/adjtime.c index 12edb63e91..1e06dab608 100644 --- a/cpukit/posix/src/adjtime.c +++ b/cpukit/posix/src/adjtime.c @@ -2,8 +2,8 @@ * adjustime() function - required by NTP * * I am unaware of the history behind the definition of this service - * and don't know if its behavior is covered by any standard. --joel - * + * and don't know if its behavior is covered by any standard. --joel + * * $Id$ */ @@ -21,14 +21,14 @@ static long __adjustment = 0; int adjtime ( struct timeval *delta, struct timeval *olddelta ) -{ +{ struct timespec ts; if ( olddelta ) { olddelta->tv_sec = __adjustment / TOD_MICROSECONDS_PER_SECOND; olddelta->tv_usec = __adjustment / TOD_MICROSECONDS_PER_SECOND; } - + if ( !delta ) return -1; @@ -36,11 +36,11 @@ int adjtime ( struct timeval *delta, struct timeval *olddelta ) /* too small to account for */ if ( __adjustment < _TOD_Microseconds_per_tick ) return 0; - + clock_gettime( CLOCK_REALTIME, &ts ); ts.tv_sec += (__adjustment / TOD_MICROSECONDS_PER_SECOND); - ts.tv_nsec += (__adjustment % TOD_MICROSECONDS_PER_SECOND) * + ts.tv_nsec += (__adjustment % TOD_MICROSECONDS_PER_SECOND) * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ diff --git a/cpukit/posix/src/aio.c b/cpukit/posix/src/aio.c index 3218f1dc97..f993a5f2d5 100644 --- a/cpukit/posix/src/aio.c +++ b/cpukit/posix/src/aio.c @@ -66,7 +66,7 @@ int aio_error( /*PAGE * - * 6.7.6 Retrieve Return Status of Asynchronous I/O Operation, + * 6.7.6 Retrieve Return Status of Asynchronous I/O Operation, * P1003.1b-1993, p. 162 */ diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c index cf8443332f..c061b97e48 100644 --- a/cpukit/posix/src/alarm.c +++ b/cpukit/posix/src/alarm.c @@ -28,7 +28,7 @@ Watchdog_Control _POSIX_signals_Alarm_timer; * * _POSIX_signals_Alarm_TSR */ - + void _POSIX_signals_Alarm_TSR( Objects_Id id, void *argument diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c index f1310d5ab1..2b72be4aef 100644 --- a/cpukit/posix/src/cancel.c +++ b/cpukit/posix/src/cancel.c @@ -35,7 +35,7 @@ int pthread_cancel( * Don't even think about deleting a resource from an ISR. */ - if ( _ISR_Is_in_progress() ) + if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); @@ -49,7 +49,7 @@ int pthread_cancel( thread_support->cancelation_requested = 1; - if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && + if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS ) { _POSIX_Threads_cancel_run( the_thread ); } @@ -57,6 +57,6 @@ int pthread_cancel( _Thread_Enable_dispatch(); return 0; } - + return POSIX_BOTTOM_REACHED(); } diff --git a/cpukit/posix/src/cancelrun.c b/cpukit/posix/src/cancelrun.c index 3eda8edabe..17fa55bdc6 100644 --- a/cpukit/posix/src/cancelrun.c +++ b/cpukit/posix/src/cancelrun.c @@ -24,7 +24,7 @@ * */ -void _POSIX_Threads_cancel_run( +void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { @@ -32,20 +32,20 @@ void _POSIX_Threads_cancel_run( Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; - + thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; - + handler_stack = &thread_support->Cancellation_Handlers; - + thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); - handler = (POSIX_Cancel_Handler_control *) + handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); - + (*handler->routine)( handler->arg ); _Workspace_Free( handler ); diff --git a/cpukit/posix/src/cleanuppop.c b/cpukit/posix/src/cleanuppop.c index d7a4c0ca11..49c35dff41 100644 --- a/cpukit/posix/src/cleanuppop.c +++ b/cpukit/posix/src/cleanuppop.c @@ -32,9 +32,9 @@ void pthread_cleanup_pop( Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; - + thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; - + handler_stack = &thread_support->Cancellation_Handlers; _ISR_Disable( level ); @@ -42,11 +42,11 @@ void pthread_cleanup_pop( _ISR_Enable( level ); return; } - - handler = (POSIX_Cancel_Handler_control *) + + handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); - + _ISR_Enable( level ); tmp_handler = *handler; diff --git a/cpukit/posix/src/cleanuppush.c b/cpukit/posix/src/cleanuppush.c index 80193749e6..6efc7f9c45 100644 --- a/cpukit/posix/src/cleanuppush.c +++ b/cpukit/posix/src/cleanuppush.c @@ -31,16 +31,16 @@ void pthread_cleanup_push( POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; - + if ( !routine ) - return; /* XXX what to do really? */ + return; /* XXX what to do really? */ _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( !handler ) { _Thread_Enable_dispatch(); - return; /* XXX what to do really? */ + return; /* XXX what to do really? */ } thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; diff --git a/cpukit/posix/src/clockgetres.c b/cpukit/posix/src/clockgetres.c index 999e4bcb13..423759c8d8 100644 --- a/cpukit/posix/src/clockgetres.c +++ b/cpukit/posix/src/clockgetres.c @@ -30,9 +30,9 @@ int clock_getres( { if ( !res ) rtems_set_errno_and_return_minus_one( EINVAL ); - + switch ( clock_id ) { - + /* * All time in rtems is based on the same clock tick. */ @@ -46,10 +46,10 @@ int clock_getres( /* _POSIX_Interval_to_timespec( _TOD_Microseconds_per_tick, res ); */ } break; - + default: rtems_set_errno_and_return_minus_one( EINVAL ); - + } return 0; } diff --git a/cpukit/posix/src/clockgettime.c b/cpukit/posix/src/clockgettime.c index d2b382b54d..97a6f607e5 100644 --- a/cpukit/posix/src/clockgettime.c +++ b/cpukit/posix/src/clockgettime.c @@ -38,15 +38,15 @@ int clock_gettime( switch ( clock_id ) { case CLOCK_REALTIME: - + _ISR_Disable( level ); seconds = _TOD_Seconds_since_epoch; ticks = _TOD_Current.ticks; _ISR_Enable( level ); - + tp->tv_sec = seconds + POSIX_TIME_SECONDS_1970_THROUGH_1988; - tp->tv_nsec = ticks * _TOD_Microseconds_per_tick * - TOD_NANOSECONDS_PER_MICROSECOND; + tp->tv_nsec = ticks * _TOD_Microseconds_per_tick * + TOD_NANOSECONDS_PER_MICROSECOND; break; #ifdef _POSIX_CPUTIME diff --git a/cpukit/posix/src/clocksettime.c b/cpukit/posix/src/clocksettime.c index a9993182a8..c85e90de61 100644 --- a/cpukit/posix/src/clocksettime.c +++ b/cpukit/posix/src/clocksettime.c @@ -35,10 +35,10 @@ int clock_settime( assert( tp ); switch ( clock_id ) { - + case CLOCK_REALTIME: (void) gmtime_r( &tp->tv_sec, &split_time ); - + /* * Convert the tm structure format to that used by the TOD Handler * @@ -57,9 +57,9 @@ int clock_settime( if ( !_TOD_Validate( &tod ) ) rtems_set_errno_and_return_minus_one( EINVAL ); - + /* - * We can't use the tp->tv_sec field because it is based on + * We can't use the tp->tv_sec field because it is based on * a different EPOCH. */ @@ -68,13 +68,13 @@ int clock_settime( _TOD_Set( &tod, seconds ); _Thread_Enable_dispatch(); break; - + #ifdef _POSIX_CPUTIME case CLOCK_PROCESS_CPUTIME: return POSIX_NOT_IMPLEMENTED(); break; #endif - + #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); @@ -82,7 +82,7 @@ int clock_settime( #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); - + } return 0; } diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c index 942f6f2107..b2d0fcd8d1 100644 --- a/cpukit/posix/src/cond.c +++ b/cpukit/posix/src/cond.c @@ -21,7 +21,7 @@ * * _POSIX_Condition_variables_Manager_initialization * - * This routine initializes all condition variable manager related data + * This routine initializes all condition variable manager related data * structures. * * Input parameters: @@ -29,7 +29,7 @@ * * Output parameters: NONE */ - + void _POSIX_Condition_variables_Manager_initialization( uint32_t maximum_condition_variables ) @@ -48,5 +48,5 @@ void _POSIX_Condition_variables_Manager_initialization( FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif - ); + ); } diff --git a/cpukit/posix/src/condattrdestroy.c b/cpukit/posix/src/condattrdestroy.c index 14ab750706..3d818e9fef 100644 --- a/cpukit/posix/src/condattrdestroy.c +++ b/cpukit/posix/src/condattrdestroy.c @@ -19,10 +19,10 @@ /*PAGE * - * 11.4.1 Condition Variable Initialization Attributes, + * 11.4.1 Condition Variable Initialization Attributes, * P1003.1c/Draft 10, p. 96 */ - + int pthread_condattr_destroy( pthread_condattr_t *attr ) diff --git a/cpukit/posix/src/condattrgetpshared.c b/cpukit/posix/src/condattrgetpshared.c index e1d7094764..479fb61cfb 100644 --- a/cpukit/posix/src/condattrgetpshared.c +++ b/cpukit/posix/src/condattrgetpshared.c @@ -19,10 +19,10 @@ /*PAGE * - * 11.4.1 Condition Variable Initialization Attributes, + * 11.4.1 Condition Variable Initialization Attributes, * P1003.1c/Draft 10, p. 96 */ - + int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared diff --git a/cpukit/posix/src/condattrinit.c b/cpukit/posix/src/condattrinit.c index 54f4c8bbd7..3cd620a312 100644 --- a/cpukit/posix/src/condattrinit.c +++ b/cpukit/posix/src/condattrinit.c @@ -19,10 +19,10 @@ /*PAGE * - * 11.4.1 Condition Variable Initialization Attributes, + * 11.4.1 Condition Variable Initialization Attributes, * P1003.1c/Draft 10, p. 96 */ - + int pthread_condattr_init( pthread_condattr_t *attr ) diff --git a/cpukit/posix/src/condattrsetpshared.c b/cpukit/posix/src/condattrsetpshared.c index 976091f722..05539b2866 100644 --- a/cpukit/posix/src/condattrsetpshared.c +++ b/cpukit/posix/src/condattrsetpshared.c @@ -19,10 +19,10 @@ /*PAGE * - * 11.4.1 Condition Variable Initialization Attributes, + * 11.4.1 Condition Variable Initialization Attributes, * P1003.1c/Draft 10, p. 96 */ - + int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared diff --git a/cpukit/posix/src/condbroadcast.c b/cpukit/posix/src/condbroadcast.c index bba153fbc7..b1efbceb96 100644 --- a/cpukit/posix/src/condbroadcast.c +++ b/cpukit/posix/src/condbroadcast.c @@ -21,7 +21,7 @@ * * 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 */ - + int pthread_cond_broadcast( pthread_cond_t *cond ) diff --git a/cpukit/posix/src/conddefaultattributes.c b/cpukit/posix/src/conddefaultattributes.c index 2dc5ef7fcc..b8b0ae824c 100644 --- a/cpukit/posix/src/conddefaultattributes.c +++ b/cpukit/posix/src/conddefaultattributes.c @@ -21,7 +21,7 @@ * * The default condition variable attributes structure. */ - + const pthread_condattr_t _POSIX_Condition_variables_Default_attributes = { TRUE, /* is_initialized */ PTHREAD_PROCESS_PRIVATE /* process_shared */ diff --git a/cpukit/posix/src/conddestroy.c b/cpukit/posix/src/conddestroy.c index 012a48148d..a6d2c0fc81 100644 --- a/cpukit/posix/src/conddestroy.c +++ b/cpukit/posix/src/conddestroy.c @@ -19,17 +19,17 @@ /*PAGE * - * 11.4.2 Initializing and Destroying a Condition Variable, + * 11.4.2 Initializing and Destroying a Condition Variable, * P1003.1c/Draft 10, p. 87 */ - + int pthread_cond_destroy( pthread_cond_t *cond ) { register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; - + the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_REMOTE: @@ -44,27 +44,27 @@ int pthread_cond_destroy( case OBJECTS_LOCAL: - + if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } - + _Objects_Close( &_POSIX_Condition_variables_Information, &the_cond->Object ); - + _POSIX_Condition_variables_Free( the_cond ); - + #if defined(RTEMS_MULTIPROCESSING) if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) { - + _Objects_MP_Close( &_POSIX_Condition_variables_Information, the_cond->Object.id ); - + _POSIX_Condition_variables_MP_Send_process_packet( POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE, the_cond->Object.id, diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c index cab76e4ab1..319cd4383a 100644 --- a/cpukit/posix/src/condinit.c +++ b/cpukit/posix/src/condinit.c @@ -19,10 +19,10 @@ /*PAGE * - * 11.4.2 Initializing and Destroying a Condition Variable, + * 11.4.2 Initializing and Destroying a Condition Variable, * P1003.1c/Draft 10, p. 87 */ - + int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr @@ -30,29 +30,29 @@ int pthread_cond_init( { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; - + if ( attr ) the_attr = attr; else the_attr = &_POSIX_Condition_variables_Default_attributes; - + /* * XXX: Be careful about attributes when global!!! */ - + if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return POSIX_MP_NOT_IMPLEMENTED(); - + if ( !the_attr->is_initialized ) return EINVAL; - + _Thread_Disable_dispatch(); - + the_cond = _POSIX_Condition_variables_Allocate(); - + if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } - + #if defined(RTEMS_MULTIPROCESSING) if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED && !( _Objects_MP_Allocate_and_open( &_POSIX_Condition_variables_Information, @@ -62,7 +62,7 @@ int pthread_cond_init( return EAGAIN; } #endif - + the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; @@ -80,9 +80,9 @@ int pthread_cond_init( &the_cond->Object, 0 ); - + *cond = the_cond->Object.id; - + #if defined(RTEMS_MULTIPROCESSING) if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) _POSIX_Condition_variables_MP_Send_process_packet( @@ -92,7 +92,7 @@ int pthread_cond_init( 0 /* Not used */ ); #endif - + _Thread_Enable_dispatch(); return 0; diff --git a/cpukit/posix/src/condsignal.c b/cpukit/posix/src/condsignal.c index 73489a8abe..bd9d4b3b07 100644 --- a/cpukit/posix/src/condsignal.c +++ b/cpukit/posix/src/condsignal.c @@ -21,7 +21,7 @@ * * 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 */ - + int pthread_cond_signal( pthread_cond_t *cond ) diff --git a/cpukit/posix/src/condsignalsupp.c b/cpukit/posix/src/condsignalsupp.c index 45df6c6056..5fad8e0ead 100644 --- a/cpukit/posix/src/condsignalsupp.c +++ b/cpukit/posix/src/condsignalsupp.c @@ -24,7 +24,7 @@ * A support routine which implements guts of the broadcast and single task * wake up version of the "signal" operation. */ - + int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, boolean is_broadcast @@ -33,7 +33,7 @@ int _POSIX_Condition_variables_Signal_support( register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; - + the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_REMOTE: @@ -46,8 +46,8 @@ int _POSIX_Condition_variables_Signal_support( case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: - - do { + + do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; diff --git a/cpukit/posix/src/condtimedwait.c b/cpukit/posix/src/condtimedwait.c index 6828393a89..32ce1d4a05 100644 --- a/cpukit/posix/src/condtimedwait.c +++ b/cpukit/posix/src/condtimedwait.c @@ -21,7 +21,7 @@ * * 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105 */ - + int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, @@ -48,7 +48,7 @@ int pthread_cond_timedwait( if ( ( difference.tv_sec < 0 ) || ( ( difference.tv_sec == 0 ) && ( difference.tv_nsec < 0 ) ) ) - already_timedout = TRUE; + already_timedout = TRUE; timeout = _POSIX_Timespec_to_interval( &difference ); diff --git a/cpukit/posix/src/condwait.c b/cpukit/posix/src/condwait.c index 24af0603a7..cde020fe93 100644 --- a/cpukit/posix/src/condwait.c +++ b/cpukit/posix/src/condwait.c @@ -21,7 +21,7 @@ * * 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105 */ - + int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c index 29995dd629..02780779bf 100644 --- a/cpukit/posix/src/condwaitsupp.c +++ b/cpukit/posix/src/condwaitsupp.c @@ -24,7 +24,7 @@ * A support routine which implements guts of the blocking, non-blocking, and * timed wait version of condition variable wait routines. */ - + int _POSIX_Condition_variables_Wait_support( pthread_cond_t *cond, pthread_mutex_t *mutex, @@ -36,7 +36,7 @@ int _POSIX_Condition_variables_Wait_support( Objects_Locations location; int status; int mutex_status; - + if ( !_POSIX_Mutex_Get( mutex, &location ) ) { return EINVAL; } @@ -54,12 +54,12 @@ int _POSIX_Condition_variables_Wait_support( case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: - + if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } - + (void) pthread_mutex_unlock( mutex ); /* XXX ignore this for now since behavior is undefined if ( mutex_status ) { @@ -70,7 +70,7 @@ int _POSIX_Condition_variables_Wait_support( if ( !already_timedout ) { the_cond->Mutex = *mutex; - + _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; @@ -81,7 +81,7 @@ int _POSIX_Condition_variables_Wait_support( _Thread_Enable_dispatch(); /* - * Switch ourself out because we blocked as a result of the + * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ @@ -101,7 +101,7 @@ int _POSIX_Condition_variables_Wait_support( mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) return EINVAL; - + return status; } return POSIX_BOTTOM_REACHED(); diff --git a/cpukit/posix/src/execl.c b/cpukit/posix/src/execl.c index c3cba9833b..fa820a268f 100644 --- a/cpukit/posix/src/execl.c +++ b/cpukit/posix/src/execl.c @@ -1,4 +1,4 @@ -/* +/* * execl() - POSIX 1003.1b 3.1.2 * * $Id$ diff --git a/cpukit/posix/src/execle.c b/cpukit/posix/src/execle.c index f2cd1765d2..83bd05882c 100644 --- a/cpukit/posix/src/execle.c +++ b/cpukit/posix/src/execle.c @@ -1,4 +1,4 @@ -/* +/* * execle() - POSIX 1003.1b 3.1.2 * * $Id$ diff --git a/cpukit/posix/src/execlp.c b/cpukit/posix/src/execlp.c index 2b2afc05a6..2bc1303527 100644 --- a/cpukit/posix/src/execlp.c +++ b/cpukit/posix/src/execlp.c @@ -1,4 +1,4 @@ -/* +/* * execlp() - POSIX 1003.1b 3.1.2 * * $Id$ diff --git a/cpukit/posix/src/execv.c b/cpukit/posix/src/execv.c index 857999333c..c30d4939b6 100644 --- a/cpukit/posix/src/execv.c +++ b/cpukit/posix/src/execv.c @@ -1,4 +1,4 @@ -/* +/* * execv() - POSIX 1003.1b 3.1.2 * * $Id$ diff --git a/cpukit/posix/src/execve.c b/cpukit/posix/src/execve.c index e7c345b4fb..43ec3004e6 100644 --- a/cpukit/posix/src/execve.c +++ b/cpukit/posix/src/execve.c @@ -1,4 +1,4 @@ -/* +/* * execve() - POSIX 1003.1b 3.1.2 * * $Id$ diff --git a/cpukit/posix/src/execvp.c b/cpukit/posix/src/execvp.c index fd3c481237..a82db0ed32 100644 --- a/cpukit/posix/src/execvp.c +++ b/cpukit/posix/src/execvp.c @@ -1,4 +1,4 @@ -/* +/* * execvp() - POSIX 1003.1b 3.1.2 * * $Id$ diff --git a/cpukit/posix/src/fork.c b/cpukit/posix/src/fork.c index 1d67da7694..b06b1c9dbf 100644 --- a/cpukit/posix/src/fork.c +++ b/cpukit/posix/src/fork.c @@ -1,4 +1,4 @@ -/* +/* * fork() - POSIX 1003.1b 3.1.1 * * $Id$ diff --git a/cpukit/posix/src/intr.c b/cpukit/posix/src/intr.c index 8dcbd2933d..895db3c120 100644 --- a/cpukit/posix/src/intr.c +++ b/cpukit/posix/src/intr.c @@ -1,6 +1,6 @@ /* * NOTE: Each task has an interrupt semaphore associated with it. - * No matter which interrupt occurs that it has registered, + * No matter which interrupt occurs that it has registered, * the same semaphore is used. * * This whole interrupt scheme may have been eliminated in a later draft. @@ -32,8 +32,8 @@ * * This routine performs the initialization necessary for this manager. */ - -void _POSIX_Interrupt_Manager_initialization( + +void _POSIX_Interrupt_Manager_initialization( uint32_t maximum_interrupt_handlers ) { @@ -58,7 +58,7 @@ void _POSIX_Interrupt_Manager_initialization( for ( index=0 ; index < CPU_INTERRUPT_NUMBER_OF_VECTORS ; index++ ) { the_vector = &_POSIX_Interrupt_Information[ index ]; - + the_vector->number_installed = 0; the_vector->lock_count = 0; the_vector->deferred_count = 0; @@ -83,14 +83,14 @@ int intr_capture( POSIX_API_Thread_Support_Control *thread_support; proc_ptr old_handler; - if ( !_ISR_Is_vector_number_valid( intr ) || + if ( !_ISR_Is_vector_number_valid( intr ) || !_ISR_Is_valid_user_handler( intr_handler ) ) return EINVAL; _Thread_Disable_dispatch(); the_intr = _POSIX_Interrupt_Allocate(); - + if ( !the_intr ) { _Thread_Enable_dispatch(); return ENOMEM; @@ -123,18 +123,18 @@ int intr_capture( if ( !the_vector->number_installed++ ) _ISR_Install_vector( intr, - (proc_ptr) _POSIX_Interrupt_Handler, + (proc_ptr) _POSIX_Interrupt_Handler, &old_handler ); _Objects_Open( &_POSIX_Interrupt_Handlers_Information, &the_intr->Object, 0 ); - + /* * Normally, an Id would be returned here. */ - + _Thread_Enable_dispatch(); - + return 0; } @@ -190,7 +190,7 @@ int intr_release( _Thread_Enable_dispatch(); return EINVAL; /* XXX should be ENOISR; */ } - + /* * OK now we have found the interrupt handler and can do some work. */ @@ -198,7 +198,7 @@ int intr_release( _Chain_Extract( &the_intr->Object.Node ); the_intr->is_active = FALSE; - + the_vector->number_installed -= 1; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; @@ -213,7 +213,7 @@ int intr_release( _Objects_Close( &_POSIX_Interrupt_Handlers_Information, &the_intr->Object ); _POSIX_Interrupt_Free( the_intr ); - + _Thread_Enable_dispatch(); return 0; @@ -240,7 +240,7 @@ int intr_lock( return 0; } - + /*PAGE * * 22.3.1 Associate a User-Written ISR with an Interrupt, P1003.4b/D8, p. 74 @@ -251,22 +251,22 @@ int intr_unlock( ) { POSIX_Interrupt_Control *the_vector; - + _Thread_Disable_dispatch(); - + the_vector = &_POSIX_Interrupt_Information[ intr ]; - + if ( !--the_vector->lock_count ) { while ( --the_vector->deferred_count ) { _POSIX_Interrupt_Handler( intr ); } } - + _Thread_Enable_dispatch(); - + return 0; } - + /* * 22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76 */ @@ -290,7 +290,7 @@ int intr_timed_wait( 0, /* XXX does id=0 hurt in this case? */ TRUE, ticks - ); + ); _Thread_Enable_dispatch(); return _Thread_Executing->Wait.return_code; /* XXX should be POSIX */ @@ -298,7 +298,7 @@ int intr_timed_wait( /*PAGE * - * _POSIX_Interrupt_Handler + * _POSIX_Interrupt_Handler * */ @@ -311,14 +311,14 @@ void _POSIX_Interrupt_Handler( POSIX_API_Thread_Support_Control *thread_support; Chain_Node *the_node; int status; - + the_vector = &_POSIX_Interrupt_Information[ vector ]; - + the_node = _Chain_Head( &the_vector->Handlers ); - + for ( ; !_Chain_Is_tail( &the_vector->Handlers, the_node ) ; ) { the_intr = (POSIX_Interrupt_Handler_control *) the_node; - + status = (*the_intr->handler)( (void *) the_intr->user_data_area ); switch ( status ) { diff --git a/cpukit/posix/src/key.c b/cpukit/posix/src/key.c index 5b505c57ce..8723cb67a0 100644 --- a/cpukit/posix/src/key.c +++ b/cpukit/posix/src/key.c @@ -23,7 +23,7 @@ * * This routine performs the initialization necessary for this manager. */ - + void _POSIX_Key_Manager_initialization( uint32_t maximum_keys ) diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c index a86e174316..d8ae746992 100644 --- a/cpukit/posix/src/keycreate.c +++ b/cpukit/posix/src/keycreate.c @@ -33,9 +33,9 @@ int pthread_key_create( _Thread_Disable_dispatch(); - + the_key = _POSIX_Keys_Allocate(); - + if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; @@ -55,7 +55,7 @@ int pthread_key_create( if ( _Objects_Information_table[ the_api ] && _Objects_Information_table[ the_api ][ 1 ] ) { - bytes_to_allocate = sizeof( void * ) * + bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { @@ -63,14 +63,14 @@ int pthread_key_create( the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); - + _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; - memset( table, '\0', bytes_to_allocate ); + memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; } @@ -81,7 +81,7 @@ int pthread_key_create( the_key->is_active = TRUE; _Objects_Open( &_POSIX_Keys_Information, &the_key->Object, 0 ); - + *key = the_key->Object.id; _Thread_Enable_dispatch(); diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c index 1376ea0986..364108046b 100644 --- a/cpukit/posix/src/keydelete.c +++ b/cpukit/posix/src/keydelete.c @@ -28,7 +28,7 @@ int pthread_key_delete( register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; - + the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c index 6e20127306..ee6912022c 100644 --- a/cpukit/posix/src/keygetspecific.c +++ b/cpukit/posix/src/keygetspecific.c @@ -30,7 +30,7 @@ void *pthread_getspecific( uint32_t class; Objects_Locations location; void *key_data; - + the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/keyrundestructors.c b/cpukit/posix/src/keyrundestructors.c index f778d076b8..f2c3b8e380 100644 --- a/cpukit/posix/src/keyrundestructors.c +++ b/cpukit/posix/src/keyrundestructors.c @@ -49,9 +49,9 @@ void _POSIX_Keys_Run_destructors( for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { - the_key = (POSIX_Keys_Control *) + the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; - + if ( the_key && the_key->is_active && the_key->destructor ) { value = the_key->Values[ pthread_class ][ pthread_index ]; if ( value ) { @@ -62,7 +62,7 @@ void _POSIX_Keys_Run_destructors( } } - if ( are_all_null == TRUE ) + if ( are_all_null == TRUE ) return; iterations++; @@ -75,6 +75,6 @@ void _POSIX_Keys_Run_destructors( */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) - return; + return; } } diff --git a/cpukit/posix/src/keysetspecific.c b/cpukit/posix/src/keysetspecific.c index d62151a499..30f10a06b4 100644 --- a/cpukit/posix/src/keysetspecific.c +++ b/cpukit/posix/src/keysetspecific.c @@ -30,7 +30,7 @@ int pthread_setspecific( uint32_t index; uint32_t class; Objects_Locations location; - + the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c index 94ffcea3b0..945306e697 100644 --- a/cpukit/posix/src/killinfo.c +++ b/cpukit/posix/src/killinfo.c @@ -35,7 +35,7 @@ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) - + int killinfo( pid_t pid, int sig, @@ -57,18 +57,18 @@ int killinfo( siginfo_t siginfo_struct; siginfo_t *siginfo; POSIX_signals_Siginfo_node *psiginfo; - + /* * Only supported for the "calling process" (i.e. this node). */ - + if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed if not 0. */ - + if ( sig && !is_valid_signo(sig) ) { rtems_set_errno_and_return_minus_one( EINVAL ); } @@ -82,7 +82,7 @@ int killinfo( } /* - * P1003.1c/Draft 10, p. 33 says that certain signals should always + * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ @@ -136,7 +136,7 @@ int killinfo( index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; - + for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { @@ -236,7 +236,7 @@ int killinfo( /* * Now the interested thread is blocked. - * If the thread we are considering is not, the it becomes the + * If the thread we are considering is not, the it becomes the * interested thread. */ @@ -256,7 +256,7 @@ int killinfo( continue; /* - * Now both threads are blocked and the interested thread is not + * Now both threads are blocked and the interested thread is not * interruptible. * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. @@ -283,20 +283,20 @@ int killinfo( * + a thread is created with the signal unblocked, * + pthread_sigmask() unblocks the signal, * + sigprocmask() unblocks the signal, OR - * + sigaction() which changes the handler to SIG_IGN. + * + sigaction() which changes the handler to SIG_IGN. */ the_thread = NULL; goto post_process_signal; /* - * We found a thread which was interested, so now we mark that this - * thread needs to do the post context switch extension so it can + * We found a thread which was interested, so now we mark that this + * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: - + the_thread->do_post_task_switch_extension = TRUE; /* diff --git a/cpukit/posix/src/mqueue.c b/cpukit/posix/src/mqueue.c index 445da6a938..7773626c76 100644 --- a/cpukit/posix/src/mqueue.c +++ b/cpukit/posix/src/mqueue.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -44,7 +44,7 @@ * * Output parameters: NONE */ - + void _POSIX_Message_queue_Manager_initialization( uint32_t maximum_message_queues ) diff --git a/cpukit/posix/src/mqueueclose.c b/cpukit/posix/src/mqueueclose.c index e809eac3ec..9254bbf25b 100644 --- a/cpukit/posix/src/mqueueclose.c +++ b/cpukit/posix/src/mqueueclose.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -44,7 +44,7 @@ int mq_close( POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; - + the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/mqueuecreatesupp.c b/cpukit/posix/src/mqueuecreatesupp.c index 091da0de87..13097446c7 100644 --- a/cpukit/posix/src/mqueuecreatesupp.c +++ b/cpukit/posix/src/mqueuecreatesupp.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -43,9 +43,9 @@ size_t strnlen(const char *, size_t); * _POSIX_Message_queue_Create_support * * This routine does the actual creation and initialization of - * a poxix message queue. + * a poxix message queue. */ - + int _POSIX_Message_queue_Create_support( const char *name_arg, int pshared, @@ -60,11 +60,11 @@ int _POSIX_Message_queue_Create_support( size_t n; n = strnlen( name_arg, NAME_MAX ); - if ( n > NAME_MAX ) + if ( n > NAME_MAX ) return ENAMETOOLONG; _Thread_Disable_dispatch(); - + /* * There is no real basis for the default values. They will work * but were not compared against any existing implementation for @@ -98,13 +98,13 @@ int _POSIX_Message_queue_Create_support( rtems_set_errno_and_return_minus_one( ENFILE ); } #endif - + the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } - + the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; @@ -122,7 +122,7 @@ int _POSIX_Message_queue_Create_support( rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); - + /* XXX * * Note that thread blocking discipline should be based on the @@ -143,7 +143,7 @@ int _POSIX_Message_queue_Create_support( if ( pshared == PTHREAD_PROCESS_SHARED ) _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq->Object.id ); #endif - + _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); _Thread_Enable_dispatch(); @@ -155,9 +155,9 @@ int _POSIX_Message_queue_Create_support( &the_mq->Object, (char *) name ); - + *message_queue = the_mq; - + #if 0 && defined(RTEMS_MULTIPROCESSING) if ( pshared == PTHREAD_PROCESS_SHARED ) _POSIX_Message_queue_MP_Send_process_packet( @@ -167,7 +167,7 @@ int _POSIX_Message_queue_Create_support( 0 /* Not used */ ); #endif - + _Thread_Enable_dispatch(); return 0; } diff --git a/cpukit/posix/src/mqueuedeletesupp.c b/cpukit/posix/src/mqueuedeletesupp.c index 3e352a1687..bf2e52fd64 100644 --- a/cpukit/posix/src/mqueuedeletesupp.c +++ b/cpukit/posix/src/mqueuedeletesupp.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -37,7 +37,7 @@ * * _POSIX_Message_queue_Delete */ - + void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) @@ -48,7 +48,7 @@ void _POSIX_Message_queue_Delete( _Workspace_Free( the_mq->Object.name ); _Objects_Close( &_POSIX_Message_queue_Information, &the_mq->Object ); - + _CORE_message_queue_Close( &the_mq->Message_queue, NULL, /* no MP support */ @@ -56,15 +56,15 @@ void _POSIX_Message_queue_Delete( ); _POSIX_Message_queue_Free( the_mq ); - + #if 0 && defined(RTEMS_MULTIPROCESSING) if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) { - + _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq->Object.id ); - + _POSIX_Message_queue_MP_Send_process_packet( POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE, the_mq->Object.id, @@ -73,6 +73,6 @@ void _POSIX_Message_queue_Delete( ); } #endif - + } } diff --git a/cpukit/posix/src/mqueuegetattr.c b/cpukit/posix/src/mqueuegetattr.c index 3d429d779b..d5cb7ababb 100644 --- a/cpukit/posix/src/mqueuegetattr.c +++ b/cpukit/posix/src/mqueuegetattr.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -46,7 +46,7 @@ int mq_getattr( POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; - + if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); @@ -64,14 +64,14 @@ int mq_getattr( /* * Return the old values. */ - + the_mq_attr = &the_mq->Message_queue.Attributes; - + mqstat->mq_flags = the_mq_fd->oflag; mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; - + _Thread_Enable_dispatch(); return 0; } diff --git a/cpukit/posix/src/mqueuenametoid.c b/cpukit/posix/src/mqueuenametoid.c index b11c53bc51..91dd9357fd 100644 --- a/cpukit/posix/src/mqueuenametoid.c +++ b/cpukit/posix/src/mqueuenametoid.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -56,7 +56,7 @@ int _POSIX_Message_queue_Name_to_id( if( strlen(name) > PATH_MAX ) return ENAMETOOLONG; - status = _Objects_Name_to_id( + status = _Objects_Name_to_id( &_POSIX_Message_queue_Information, (char *)name, 0, id ); if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) diff --git a/cpukit/posix/src/mqueuenotify.c b/cpukit/posix/src/mqueuenotify.c index adc019b84e..5733346e16 100644 --- a/cpukit/posix/src/mqueuenotify.c +++ b/cpukit/posix/src/mqueuenotify.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -55,7 +55,7 @@ void _POSIX_Message_queue_Notify_handler( /*PAGE * - * 15.2.6 Notify Process that a Message is Available on a Queue, + * 15.2.6 Notify Process that a Message is Available on a Queue, * P1003.1b-1993, p. 280 */ @@ -67,7 +67,7 @@ int mq_notify( POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; - + the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: @@ -88,7 +88,7 @@ int mq_notify( _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; - + _CORE_message_queue_Set_notify( &the_mq->Message_queue, _POSIX_Message_queue_Notify_handler, diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c index a4a8ecc66b..8195e9d2af 100644 --- a/cpukit/posix/src/mqueueopen.c +++ b/cpukit/posix/src/mqueueopen.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -53,7 +53,7 @@ mqd_t mq_open( POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; - + _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { @@ -62,7 +62,7 @@ mqd_t mq_open( attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } - + the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); @@ -78,9 +78,9 @@ mqd_t mq_open( * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ - + if ( status ) { - + /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. @@ -93,7 +93,7 @@ mqd_t mq_open( } } else { /* name -> ID translation succeeded */ - + /* * Check for existence with creation. */ @@ -120,21 +120,21 @@ mqd_t mq_open( _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); return (mqd_t)the_mq_fd->Object.id; - + } - - /* + + /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ - + status = _POSIX_Message_queue_Create_support( name, TRUE, /* shared across processes */ attr, &the_mq ); - + /* * errno was set by Create_support, so don't set it again. */ @@ -144,14 +144,14 @@ mqd_t mq_open( _POSIX_Message_queue_Free_fd( the_mq_fd ); return (mqd_t) -1; } - + the_mq_fd->Queue = the_mq; _Objects_Open( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); - + _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; diff --git a/cpukit/posix/src/mqueuereceive.c b/cpukit/posix/src/mqueuereceive.c index 504e590c06..e87d5fa8e9 100644 --- a/cpukit/posix/src/mqueuereceive.c +++ b/cpukit/posix/src/mqueuereceive.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c index c5ccd6587d..6c2ca9e605 100644 --- a/cpukit/posix/src/mqueuerecvsupp.c +++ b/cpukit/posix/src/mqueuerecvsupp.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -39,7 +39,7 @@ * NOTE: XXX Document how size, priority, length, and the buffer go * through the layers. */ - + ssize_t _POSIX_Message_queue_Receive_support( mqd_t mqdes, char *msg_ptr, @@ -52,7 +52,7 @@ ssize_t _POSIX_Message_queue_Receive_support( POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; uint32_t length_out; - + the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: @@ -73,7 +73,7 @@ ssize_t _POSIX_Message_queue_Receive_support( _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); } - + /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. @@ -89,7 +89,7 @@ ssize_t _POSIX_Message_queue_Receive_support( (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE, timeout ); - + _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); diff --git a/cpukit/posix/src/mqueuesend.c b/cpukit/posix/src/mqueuesend.c index 3b21992659..484fe72183 100644 --- a/cpukit/posix/src/mqueuesend.c +++ b/cpukit/posix/src/mqueuesend.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -43,7 +43,7 @@ int mq_send( mqd_t mqdes, const char *msg_ptr, size_t msg_len, - unsigned int msg_prio + unsigned int msg_prio ) { return _POSIX_Message_queue_Send_support( diff --git a/cpukit/posix/src/mqueuesendsupp.c b/cpukit/posix/src/mqueuesendsupp.c index 658f879989..33109465e6 100644 --- a/cpukit/posix/src/mqueuesendsupp.c +++ b/cpukit/posix/src/mqueuesendsupp.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -37,7 +37,7 @@ * * _POSIX_Message_queue_Send_support */ - + int _POSIX_Message_queue_Send_support( mqd_t mqdes, const char *msg_ptr, @@ -88,7 +88,7 @@ int _POSIX_Message_queue_Send_support( NULL, #endif _POSIX_Message_queue_Priority_to_core( msg_prio ), - (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE, + (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE, timeout /* no timeout */ ); @@ -97,7 +97,7 @@ int _POSIX_Message_queue_Send_support( /* * If we had to block, then this is where the task returns * after it wakes up. The returned status is correct for - * non-blocking operations but if we blocked, then we need + * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ @@ -109,7 +109,7 @@ int _POSIX_Message_queue_Send_support( rtems_set_errno_and_return_minus_one( _POSIX_Message_queue_Translate_core_message_queue_return_code( - msg_status + msg_status ) ); } diff --git a/cpukit/posix/src/mqueuesetattr.c b/cpukit/posix/src/mqueuesetattr.c index 9e731602d3..6d3b132ade 100644 --- a/cpukit/posix/src/mqueuesetattr.c +++ b/cpukit/posix/src/mqueuesetattr.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -46,7 +46,7 @@ int mq_setattr( POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; - + if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); @@ -72,7 +72,7 @@ int mq_setattr( omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; } - + the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; diff --git a/cpukit/posix/src/mqueuetimedreceive.c b/cpukit/posix/src/mqueuetimedreceive.c index 61dd9a2a5f..e0f605ac91 100644 --- a/cpukit/posix/src/mqueuetimedreceive.c +++ b/cpukit/posix/src/mqueuetimedreceive.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] diff --git a/cpukit/posix/src/mqueuetimedsend.c b/cpukit/posix/src/mqueuetimedsend.c index 609379d762..89569368be 100644 --- a/cpukit/posix/src/mqueuetimedsend.c +++ b/cpukit/posix/src/mqueuetimedsend.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] diff --git a/cpukit/posix/src/mqueuetranslatereturncode.c b/cpukit/posix/src/mqueuetranslatereturncode.c index 95175afcc2..74e67d0cf7 100644 --- a/cpukit/posix/src/mqueuetranslatereturncode.c +++ b/cpukit/posix/src/mqueuetranslatereturncode.c @@ -1,5 +1,5 @@ /* - * POSIX Message Queue Error Translation + * POSIX Message Queue Error Translation * * * COPYRIGHT (c) 1989-1999. @@ -41,7 +41,7 @@ * rtems status code - translated POSIX status code * */ - + int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) @@ -81,7 +81,7 @@ int _POSIX_Message_queue_Translate_core_message_queue_return_code( return EBADF; /* - * POSIX Real-Time Extensions add timeouts to send and receive. + * POSIX Real-Time Extensions add timeouts to send and receive. */ case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT: return ETIMEDOUT; diff --git a/cpukit/posix/src/mqueueunlink.c b/cpukit/posix/src/mqueueunlink.c index fe7393085e..3a14983226 100644 --- a/cpukit/posix/src/mqueueunlink.c +++ b/cpukit/posix/src/mqueueunlink.c @@ -2,8 +2,8 @@ * NOTE: The structure of the routines is identical to that of POSIX * Message_queues to leave the option of having unnamed message * queues at a future date. They are currently not part of the - * POSIX standard but unnamed message_queues are. This is also - * the reason for the apparently unnecessary tracking of + * POSIX standard but unnamed message_queues are. This is also + * the reason for the apparently unnecessary tracking of * the process_shared attribute. [In addition to the fact that * it would be trivial to add pshared to the mq_attr structure * and have process private message queues.] @@ -45,7 +45,7 @@ int mq_unlink( int status; register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; - + _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); @@ -67,14 +67,14 @@ int mq_unlink( &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); - + #if 0 && defined(RTEMS_MULTIPROCESSING) if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) { _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq_id ); } #endif - + the_mq->linked = FALSE; _Workspace_Free( the_mq->Object.name ); _POSIX_Message_queue_Namespace_remove( the_mq ); diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c index fc0a680ea2..b7bde39167 100644 --- a/cpukit/posix/src/mutex.c +++ b/cpukit/posix/src/mutex.c @@ -31,7 +31,7 @@ * * Output parameters: NONE */ - + void _POSIX_Mutex_Manager_initialization( uint32_t maximum_mutexes ) diff --git a/cpukit/posix/src/mutexattrgetprioceiling.c b/cpukit/posix/src/mutexattrgetprioceiling.c index 5c2d7ef576..f0ef90b61f 100644 --- a/cpukit/posix/src/mutexattrgetprioceiling.c +++ b/cpukit/posix/src/mutexattrgetprioceiling.c @@ -24,7 +24,7 @@ * * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */ - + int pthread_mutexattr_getprioceiling( const pthread_mutexattr_t *attr, int *prioceiling diff --git a/cpukit/posix/src/mutexattrgetprotocol.c b/cpukit/posix/src/mutexattrgetprotocol.c index 2e6d1e36fb..2537ba00bf 100644 --- a/cpukit/posix/src/mutexattrgetprotocol.c +++ b/cpukit/posix/src/mutexattrgetprotocol.c @@ -24,7 +24,7 @@ * * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */ - + int pthread_mutexattr_getprotocol( const pthread_mutexattr_t *attr, int *protocol diff --git a/cpukit/posix/src/mutexattrsetprioceiling.c b/cpukit/posix/src/mutexattrsetprioceiling.c index dc2e8d08e6..da34a2fbb3 100644 --- a/cpukit/posix/src/mutexattrsetprioceiling.c +++ b/cpukit/posix/src/mutexattrsetprioceiling.c @@ -24,7 +24,7 @@ * * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */ - + int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling diff --git a/cpukit/posix/src/mutexattrsetprotocol.c b/cpukit/posix/src/mutexattrsetprotocol.c index e92bdefe55..2f74abf3d2 100644 --- a/cpukit/posix/src/mutexattrsetprotocol.c +++ b/cpukit/posix/src/mutexattrsetprotocol.c @@ -24,7 +24,7 @@ * * 13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */ - + int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol @@ -39,7 +39,7 @@ int pthread_mutexattr_setprotocol( case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; - + default: return EINVAL; } diff --git a/cpukit/posix/src/mutexdefaultattributes.c b/cpukit/posix/src/mutexdefaultattributes.c index 3324a727f9..bdca71a43b 100644 --- a/cpukit/posix/src/mutexdefaultattributes.c +++ b/cpukit/posix/src/mutexdefaultattributes.c @@ -21,7 +21,7 @@ #include /*PAGE - * + * * The default mutex attributes structure. */ diff --git a/cpukit/posix/src/mutexdestroy.c b/cpukit/posix/src/mutexdestroy.c index 51507b5b28..f4210148cd 100644 --- a/cpukit/posix/src/mutexdestroy.c +++ b/cpukit/posix/src/mutexdestroy.c @@ -31,7 +31,7 @@ int pthread_mutex_destroy( { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; - + the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_REMOTE: @@ -52,9 +52,9 @@ int pthread_mutex_destroy( _Thread_Enable_dispatch(); return EBUSY; } - + _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); - + _CORE_mutex_Flush( &the_mutex->Mutex, #if defined(RTEMS_MULTIPROCESSING) @@ -64,14 +64,14 @@ int pthread_mutex_destroy( #endif EINVAL ); - + _POSIX_Mutex_Free( the_mutex ); - + #if defined(RTEMS_MULTIPROCESSING) if ( the_mutex->process_shared == PTHREAD_PROCESS_SHARED ) { - + _Objects_MP_Close( &_POSIX_Mutex_Information, the_mutex->Object.id ); - + _POSIX_Mutex_MP_Send_process_packet( POSIX_MUTEX_MP_ANNOUNCE_DELETE, the_mutex->Object.id, diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c index 97882040f9..3af8c1d621 100644 --- a/cpukit/posix/src/mutexinit.c +++ b/cpukit/posix/src/mutexinit.c @@ -51,7 +51,7 @@ int pthread_mutex_init( return EINVAL; /* - * This code should eventually be removed. + * This code should eventually be removed. * * Although the POSIX specification says: * @@ -70,7 +70,7 @@ int pthread_mutex_init( * Joel Sherrill 14 May 1999 */ - + #if 0 /* avoid infinite recursion on call to this routine in _POSIX_Mutex_Get */ @@ -89,8 +89,8 @@ int pthread_mutex_init( } } #endif - - if ( !the_attr->is_initialized ) + + if ( !the_attr->is_initialized ) return EINVAL; /* @@ -103,11 +103,11 @@ int pthread_mutex_init( if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return POSIX_MP_NOT_IMPLEMENTED(); #endif - + /* * Determine the discipline of the mutex */ - + switch ( the_attr->protocol ) { case PTHREAD_PRIO_NONE: the_discipline = CORE_MUTEX_DISCIPLINES_FIFO; @@ -128,14 +128,14 @@ int pthread_mutex_init( _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); - + if ( !the_mutex ) { _Thread_Enable_dispatch(); return EAGAIN; } #if defined(RTEMS_MULTIPROCESSING) - if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED && + if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED && !( _Objects_MP_Allocate_and_open( &_POSIX_Mutex_Information, 0, the_mutex->Object.id, FALSE ) ) ) { _POSIX_Mutex_Free( the_mutex ); diff --git a/cpukit/posix/src/mutexlock.c b/cpukit/posix/src/mutexlock.c index ce09506090..b040dc08d4 100644 --- a/cpukit/posix/src/mutexlock.c +++ b/cpukit/posix/src/mutexlock.c @@ -23,7 +23,7 @@ /*PAGE * * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 - * + * * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */ diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c index 6db15c172f..9e8ee10172 100644 --- a/cpukit/posix/src/mutexlocksupp.c +++ b/cpukit/posix/src/mutexlocksupp.c @@ -37,7 +37,7 @@ int _POSIX_Mutex_Lock_support( register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; - + the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { case OBJECTS_REMOTE: diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c index b1cd4c48d8..60c82a4f19 100644 --- a/cpukit/posix/src/mutexsetprioceiling.c +++ b/cpukit/posix/src/mutexsetprioceiling.c @@ -68,7 +68,7 @@ int pthread_mutex_setprioceiling( the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( &the_mutex->Mutex, - the_mutex->Object.id, + the_mutex->Object.id, #if defined(RTEMS_MULTIPROCESSING) _POSIX_Threads_mutex_MP_support #else diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c index 2a0bbbfbb2..6555f5a4d2 100644 --- a/cpukit/posix/src/mutextimedlock.c +++ b/cpukit/posix/src/mutextimedlock.c @@ -23,7 +23,7 @@ /*PAGE * * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 - * + * * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */ @@ -32,7 +32,7 @@ int pthread_mutex_timedlock( const struct timespec *timeout ) { - return _POSIX_Mutex_Lock_support( + return _POSIX_Mutex_Lock_support( mutex, TRUE, _POSIX_Timespec_to_interval( timeout ) diff --git a/cpukit/posix/src/mutextrylock.c b/cpukit/posix/src/mutextrylock.c index 87d6a47790..68df754b0a 100644 --- a/cpukit/posix/src/mutextrylock.c +++ b/cpukit/posix/src/mutextrylock.c @@ -23,7 +23,7 @@ /*PAGE * * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 - * + * * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */ diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c index 7169c7a2b1..b88ae4c269 100644 --- a/cpukit/posix/src/mutexunlock.c +++ b/cpukit/posix/src/mutexunlock.c @@ -23,7 +23,7 @@ /*PAGE * * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 - * + * * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */ @@ -34,7 +34,7 @@ int pthread_mutex_unlock( register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; - + the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_REMOTE: @@ -51,7 +51,7 @@ int pthread_mutex_unlock( case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( &the_mutex->Mutex, - the_mutex->Object.id, + the_mutex->Object.id, #if defined(RTEMS_MULTIPROCESSING) _POSIX_Threads_mutex_MP_support #else diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c index 24f9dd6969..06fc1bc5cb 100644 --- a/cpukit/posix/src/nanosleep.c +++ b/cpukit/posix/src/nanosleep.c @@ -37,9 +37,9 @@ int nanosleep( the_rqtp = (struct timespec *)rqtp; /* - * Return EAGAIN if the delay interval is negative. + * Return EAGAIN if the delay interval is negative. * - * NOTE: This behavior is beyond the POSIX specification. + * NOTE: This behavior is beyond the POSIX specification. * FSU pthreads shares this behavior. */ @@ -51,7 +51,7 @@ int nanosleep( if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); - + ticks = _POSIX_Timespec_to_interval( the_rqtp ); /* @@ -64,12 +64,12 @@ int nanosleep( _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { - rmtp->tv_sec = 0; - rmtp->tv_nsec = 0; + rmtp->tv_sec = 0; + rmtp->tv_nsec = 0; } return 0; } - + _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, @@ -87,7 +87,7 @@ int nanosleep( /* calculate time remaining */ if ( rmtp ) { - ticks -= + ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _POSIX_Interval_to_timespec( ticks, rmtp ); diff --git a/cpukit/posix/src/posixintervaltotimespec.c b/cpukit/posix/src/posixintervaltotimespec.c index a7238fef8d..916b890d8a 100644 --- a/cpukit/posix/src/posixintervaltotimespec.c +++ b/cpukit/posix/src/posixintervaltotimespec.c @@ -22,7 +22,7 @@ * * _POSIX_Interval_to_timespec */ - + void _POSIX_Interval_to_timespec( Watchdog_Interval ticks, struct timespec *time @@ -33,6 +33,6 @@ void _POSIX_Interval_to_timespec( usecs = ticks * _TOD_Microseconds_per_tick; time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; - time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * + time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * TOD_NANOSECONDS_PER_MICROSECOND; } diff --git a/cpukit/posix/src/posixtimespecsubtract.c b/cpukit/posix/src/posixtimespecsubtract.c index 1239eb410f..0fa611b6ea 100644 --- a/cpukit/posix/src/posixtimespecsubtract.c +++ b/cpukit/posix/src/posixtimespecsubtract.c @@ -32,19 +32,19 @@ void _POSIX_Timespec_subtract( struct timespec start_struct = *the_start; struct timespec *start = &start_struct; uint32_t nsecs_per_sec = TOD_NANOSECONDS_PER_SECOND; - + if (end->tv_nsec < start->tv_nsec) { int seconds = (start->tv_nsec - end->tv_nsec) / nsecs_per_sec + 1; start->tv_nsec -= nsecs_per_sec * seconds; start->tv_sec += seconds; } - + if (end->tv_nsec - start->tv_nsec > nsecs_per_sec) { int seconds = (start->tv_nsec - end->tv_nsec) / nsecs_per_sec; start->tv_nsec += nsecs_per_sec * seconds; start->tv_sec -= seconds; } - + result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; } diff --git a/cpukit/posix/src/posixtimespectointerval.c b/cpukit/posix/src/posixtimespectointerval.c index 5aa5f0c56f..3e4d5cf130 100644 --- a/cpukit/posix/src/posixtimespectointerval.c +++ b/cpukit/posix/src/posixtimespectointerval.c @@ -29,10 +29,10 @@ Watchdog_Interval _POSIX_Timespec_to_interval( { Watchdog_Interval ticks; - ticks = (time->tv_sec * TOD_MICROSECONDS_PER_SECOND) / + ticks = (time->tv_sec * TOD_MICROSECONDS_PER_SECOND) / _TOD_Microseconds_per_tick; - ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / + ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / _TOD_Microseconds_per_tick; if (ticks) diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c index a6e8968669..be8a7dadf4 100644 --- a/cpukit/posix/src/psignal.c +++ b/cpukit/posix/src/psignal.c @@ -107,13 +107,13 @@ void _POSIX_signals_Post_switch_extension( * a new signal has been posted that we should process so we * restart the loop if a signal handler was invoked. * - * The first thing done is to check there are any signals to be + * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ restart: _ISR_Disable( level ); - if ( !(~api->signals_blocked & + if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); return; @@ -136,7 +136,7 @@ restart: if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) goto restart; - + if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) goto restart; @@ -163,12 +163,12 @@ void _POSIX_signals_Manager_Initialization( sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors) ); - memcpy( + memcpy( _POSIX_signals_Vectors, _POSIX_signals_Default_vectors, sizeof( _POSIX_signals_Vectors ) ); - + /* * Initialize the set of pending signals for the entire process */ @@ -178,7 +178,7 @@ void _POSIX_signals_Manager_Initialization( /* * Initialize the queue we use to block for signals */ - + _Thread_queue_Initialize( &_POSIX_signals_Wait_queue, THREAD_QUEUE_DISCIPLINE_PRIORITY, @@ -188,7 +188,7 @@ void _POSIX_signals_Manager_Initialization( /* XXX status codes */ - /* + /* * Allocate the siginfo pools. */ diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c index 9832331774..0da7887afd 100644 --- a/cpukit/posix/src/psignalchecksignal.c +++ b/cpukit/posix/src/psignalchecksignal.c @@ -45,11 +45,11 @@ boolean _POSIX_signals_Check_signal( /* * Since we made a union of these, only one test is necessary but this is * safer. - */ + */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || _POSIX_signals_Vectors[ signo ].sa_sigaction ); - + /* * Just to prevent sending a signal which is currently being ignored. */ @@ -86,7 +86,7 @@ boolean _POSIX_signals_Check_signal( /* * Restore the previous set of blocked signals */ - + api->signals_blocked = saved_signals_blocked; return TRUE; diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c index 69517f5dc5..a1e397c695 100644 --- a/cpukit/posix/src/psignalclearsignals.c +++ b/cpukit/posix/src/psignalclearsignals.c @@ -27,7 +27,7 @@ * * _POSIX_signals_Clear_signals */ - + boolean _POSIX_signals_Clear_signals( POSIX_API_Control *api, int signo, @@ -41,11 +41,11 @@ boolean _POSIX_signals_Clear_signals( ISR_Level level; boolean do_callout; POSIX_signals_Siginfo_node *psiginfo; - + mask = signo_to_mask( signo ); - + 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. */ @@ -57,7 +57,7 @@ boolean _POSIX_signals_Clear_signals( /* XXX this is not right for siginfo type signals yet */ /* XXX since they can't be cleared the same way */ - + _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { @@ -85,5 +85,5 @@ boolean _POSIX_signals_Clear_signals( } } _ISR_Enable( level ); - return do_callout; + return do_callout; } diff --git a/cpukit/posix/src/psignalsetprocesssignals.c b/cpukit/posix/src/psignalsetprocesssignals.c index b2f6599b4d..65cb51664e 100644 --- a/cpukit/posix/src/psignalsetprocesssignals.c +++ b/cpukit/posix/src/psignalsetprocesssignals.c @@ -27,13 +27,13 @@ * * _POSIX_signals_Set_process_signals */ - + void _POSIX_signals_Set_process_signals( sigset_t mask ) { ISR_Level level; - + _ISR_Disable( level ); if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension++; diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c index 3141c840c4..249d16392a 100644 --- a/cpukit/posix/src/psignalunblockthread.c +++ b/cpukit/posix/src/psignalunblockthread.c @@ -30,7 +30,7 @@ */ /* XXX this routine could probably be cleaned up */ -boolean _POSIX_signals_Unblock_thread( +boolean _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info @@ -62,7 +62,7 @@ boolean _POSIX_signals_Unblock_thread( } else { *the_info = *info; } - + _Thread_queue_Extract_with_proxy( the_thread ); return TRUE; } diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index e4a780835c..0212f9d6ac 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -29,11 +29,11 @@ * * The default pthreads attributes structure. * - * NOTE: Be careful .. if the default attribute set changes, + * NOTE: Be careful .. if the default attribute set changes, * _POSIX_Threads_Initialize_user_threads will need to be examined. * */ - + const pthread_attr_t _POSIX_Threads_Default_attributes = { TRUE, /* is_initialized */ NULL, /* stackaddr */ @@ -76,7 +76,7 @@ void _POSIX_Threads_Sporadic_budget_TSR( ticks = 1; the_thread->cpu_time_budget = ticks; - + new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; @@ -128,7 +128,7 @@ void _POSIX_Threads_Sporadic_budget_callout( * * XXX */ - + boolean _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created @@ -136,23 +136,23 @@ boolean _POSIX_Threads_Create_extension( { POSIX_API_Control *api; POSIX_API_Control *executing_api; - + api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); - + if ( !api ) return FALSE; - + created->API_Extensions[ THREAD_API_POSIX ] = api; - + /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; - api->schedparam.sched_priority = + api->schedparam.sched_priority = _POSIX_Priority_From_core( created->current_priority ); - - /* + + /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; @@ -180,7 +180,7 @@ boolean _POSIX_Threads_Create_extension( STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); - + _Watchdog_Initialize( &api->Sporadic_timer, _POSIX_Threads_Sporadic_budget_TSR, @@ -195,7 +195,7 @@ boolean _POSIX_Threads_Create_extension( * * _POSIX_Threads_Delete_extension */ - + User_extensions_routine _POSIX_Threads_Delete_extension( Thread_Control *executing, Thread_Control *deleted @@ -206,7 +206,7 @@ User_extensions_routine _POSIX_Threads_Delete_extension( void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; - + /* * Run the POSIX cancellation handlers */ @@ -216,12 +216,12 @@ User_extensions_routine _POSIX_Threads_Delete_extension( /* * Wakeup all the tasks which joined with this one */ - + value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; - + if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); @@ -234,7 +234,7 @@ User_extensions_routine _POSIX_Threads_Delete_extension( * * _POSIX_Threads_Exitted_extension */ - + User_extensions_routine _POSIX_Threads_Exitted_extension( Thread_Control *executing ) @@ -253,7 +253,7 @@ User_extensions_routine _POSIX_Threads_Exitted_extension( * * Output parameters: NONE */ - + void _POSIX_Threads_Initialize_user_threads( void ) { int status; @@ -262,24 +262,24 @@ void _POSIX_Threads_Initialize_user_threads( void ) posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; - + user_threads = _POSIX_Threads_User_initialization_threads; maximum = _POSIX_Threads_Number_of_initialization_threads; if ( !user_threads || maximum == 0 ) return; - + /* * Be careful .. if the default attribute set changes, this may need to. * * Setting the attributes explicitly is critical, since we don't want - * to inherit the idle tasks attributes. + * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); assert( !status ); - + status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); assert( !status ); @@ -307,7 +307,7 @@ API_extensions_Control _POSIX_Threads_API_extensions = { _POSIX_Threads_Initialize_user_threads, /* postdriver */ _POSIX_signals_Post_switch_extension, /* post switch */ }; - + User_extensions_Control _POSIX_Threads_User_extensions = { { NULL, NULL }, { { NULL, NULL }, NULL }, @@ -321,7 +321,7 @@ User_extensions_Control _POSIX_Threads_User_extensions = { NULL /* fatal */ } }; - + /*PAGE * * _POSIX_Threads_Manager_initialization @@ -333,15 +333,15 @@ User_extensions_Control _POSIX_Threads_User_extensions = { * * Output parameters: NONE */ - + void _POSIX_Threads_Manager_initialization( uint32_t maximum_pthreads, uint32_t number_of_initialization_threads, posix_initialization_threads_table *user_threads - + ) { - _POSIX_Threads_Number_of_initialization_threads = + _POSIX_Threads_Number_of_initialization_threads = number_of_initialization_threads; _POSIX_Threads_User_initialization_threads = user_threads; @@ -373,15 +373,15 @@ void _POSIX_Threads_Manager_initialization( /* * Add all the extensions for this API */ - + _User_extensions_Add_API_set( &_POSIX_Threads_User_extensions ); _API_extensions_Add( &_POSIX_Threads_API_extensions ); - + /* * If we supported MP, then here we would ... * Register the MP Process Packet routine. */ - + } diff --git a/cpukit/posix/src/pthreadatfork.c b/cpukit/posix/src/pthreadatfork.c index f8eaf6da90..7bc398ed85 100644 --- a/cpukit/posix/src/pthreadatfork.c +++ b/cpukit/posix/src/pthreadatfork.c @@ -1,4 +1,4 @@ -/* +/* * pthread_atfork() - POSIX 1003.1b 3.1.3 * * 3.1.3 Register Fork Handlers, P1003.1c/Draft 10, P1003.1c/Draft 10, p. 27 diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index 369ad54f63..61a59c01f8 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -65,7 +65,7 @@ int pthread_create( * * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is - * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the + * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ @@ -74,19 +74,19 @@ int pthread_create( api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; schedparam = api->schedparam; - break; + break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; - break; + break; default: return EINVAL; } /* - * Check the contentionscope since rtems only supports PROCESS wide + * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ @@ -99,9 +99,9 @@ int pthread_create( if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; - + core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); - + /* * Set the core scheduling policy information. */ @@ -113,7 +113,7 @@ int pthread_create( case SCHED_OTHER: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; break; - + case SCHED_FIFO: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; break; @@ -125,7 +125,7 @@ int pthread_create( case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; - + if ( _POSIX_Timespec_to_interval( &schedparam.ss_replenish_period ) < _POSIX_Timespec_to_interval( &schedparam.ss_initial_budget ) ) return EINVAL; @@ -140,7 +140,7 @@ int pthread_create( } /* - * Currently all POSIX threads are floating point if the hardware + * Currently all POSIX threads are floating point if the hardware * supports it. */ @@ -154,9 +154,9 @@ int pthread_create( /* * Disable dispatch for protection */ - + _Thread_Disable_dispatch(); - + /* * Allocate the thread control block. * @@ -173,7 +173,7 @@ int pthread_create( /* * Initialize the core thread for this task. */ - + status = _Thread_Initialize( &_POSIX_Threads_Information, the_thread, @@ -187,7 +187,7 @@ int pthread_create( 0, /* isr level */ NULL /* posix threads don't have a name */ ); - + if ( !status ) { _POSIX_Threads_Free( the_thread ); _Thread_Enable_dispatch(); @@ -198,7 +198,7 @@ int pthread_create( * finish initializing the per API structure */ - + api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c index a16c56881d..6a1a7b4c86 100644 --- a/cpukit/posix/src/pthreadkill.c +++ b/cpukit/posix/src/pthreadkill.c @@ -37,7 +37,7 @@ int pthread_kill( if ( sig && !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); -/* commented out when posix timers added +/* commented out when posix timers added if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) rtems_set_errno_and_return_minus_one( ENOSYS ); */ diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c index ac061d9c75..3413dbfc74 100644 --- a/cpukit/posix/src/pthreadsetschedparam.c +++ b/cpukit/posix/src/pthreadsetschedparam.c @@ -1,5 +1,5 @@ /* - * 13.5.2 Dynamic Thread Scheduling Parameters Access, + * 13.5.2 Dynamic Thread Scheduling Parameters Access, * P1003.1c/Draft 10, p. 124 * * COPYRIGHT (c) 1989-1999. @@ -35,7 +35,7 @@ int pthread_setschedparam( Thread_CPU_budget_algorithms budget_algorithm; Thread_CPU_budget_algorithm_callout budget_callout; Objects_Locations location; - + /* * Check all the parameters */ @@ -53,28 +53,28 @@ int pthread_setschedparam( case SCHED_OTHER: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; break; - + case SCHED_FIFO: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; break; - + case SCHED_RR: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; break; - + case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; - + if ( _POSIX_Timespec_to_interval( ¶m->ss_replenish_period ) < _POSIX_Timespec_to_interval( ¶m->ss_initial_budget ) ) return EINVAL; - + if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) return EINVAL; - + break; - + default: return EINVAL; } @@ -114,7 +114,7 @@ int pthread_setschedparam( TRUE ); break; - + case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; _Watchdog_Remove( &api->Sporadic_timer ); diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c index a04007402f..59bc688fcd 100644 --- a/cpukit/posix/src/pthreadsigmask.c +++ b/cpukit/posix/src/pthreadsigmask.c @@ -41,7 +41,7 @@ int pthread_sigmask( if ( oset ) *oset = api->signals_blocked; - + if ( !set ) return 0; @@ -63,7 +63,7 @@ int pthread_sigmask( /* XXX evaluate the new set */ - if ( ~api->signals_blocked & + if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = TRUE; _Thread_Dispatch(); diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c index de74ec1347..a2666c86f9 100644 --- a/cpukit/posix/src/ptimer.c +++ b/cpukit/posix/src/ptimer.c @@ -5,7 +5,7 @@ #if HAVE_CONFIG_H #include "config.h" #endif - + #include #include #include @@ -73,7 +73,7 @@ void TIMER_INITIALIZE_S ( int timer_pos ) /* *************************************************************************** * _POSIX_Timer_Manager_initialization * - * Description: Initialize the internal structure in which the data of all + * Description: Initialize the internal structure in which the data of all * the timers are stored * ***************************************************************************/ @@ -88,7 +88,7 @@ void _POSIX_Timer_Manager_initialization ( int max_timers ) timer_struct = _Workspace_Allocate_or_fatal_error( max_timers * sizeof(POSIX_Timer_Control) ); - /* + /* * Initialize all the timers */ diff --git a/cpukit/posix/src/ptimer1.c b/cpukit/posix/src/ptimer1.c index 4758b68113..6f7ec2466f 100644 --- a/cpukit/posix/src/ptimer1.c +++ b/cpukit/posix/src/ptimer1.c @@ -5,7 +5,7 @@ #if HAVE_CONFIG_H #include "config.h" #endif - + #include #include #include @@ -39,16 +39,16 @@ /* End of necessary includes */ /*****************************/ -/* ************ +/* ************ * Constants - * ************/ + * ************/ /* #define DEBUG_MESSAGES */ /* - * Data for the signals + * Data for the signals */ /*********************************** @@ -58,7 +58,7 @@ /* *************************************************************************** * TIMER_INITIALIZE_S * - * Description: Initialize the data of a timer + * Description: Initialize the data of a timer * ***************************************************************************/ extern void TIMER_INITIALIZE_S ( int timer_pos ); @@ -66,17 +66,17 @@ extern void TIMER_INITIALIZE_S ( int timer_pos ); /* *************************************************************************** * _POSIX_Timer_Manager_initialization * - * Description: Initialize the internal structure in which the data of all + * Description: Initialize the internal structure in which the data of all * the timers are stored * ***************************************************************************/ /* split to reduce minimum size */ /* *************************************************************************** - * FIRST_FREE_POSITION_F + * FIRST_FREE_POSITION_F * * Description: Returns the first free position in the table of timers. - * If there is not a free position, it returns NO_MORE_TIMERS_C + * If there is not a free position, it returns NO_MORE_TIMERS_C * ***************************************************************************/ int FIRST_FREE_POSITION_F () @@ -88,14 +88,14 @@ int FIRST_FREE_POSITION_F () return index; } } - + /* The function reaches this point only if all the position are occupied */ return NO_MORE_TIMERS_C; } /* *************************************************************************** - * TIMER_POSITION_F + * TIMER_POSITION_F * * Description: Returns the position in the table of timers in which the * data of the timer are stored. @@ -125,12 +125,12 @@ int TIMER_POSITION_F ( timer_t timer_id ) } /* *************************************************************************** - * COPY_ITIMERSPEC_S + * COPY_ITIMERSPEC_S * - * Description: Does a copy of a variable of type struct itimerspec + * Description: Does a copy of a variable of type struct itimerspec * ***************************************************************************/ -void COPY_ITIMERSPEC_S ( const struct itimerspec *source, +void COPY_ITIMERSPEC_S ( const struct itimerspec *source, struct itimerspec *target ) { @@ -142,19 +142,19 @@ void COPY_ITIMERSPEC_S ( const struct itimerspec *source, } /* *************************************************************************** - * ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S + * ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S * - * Description: This function converts the data of a structure itimerspec - * into structure rtems_time_of_day + * Description: This function converts the data of a structure itimerspec + * into structure rtems_time_of_day * ***************************************************************************/ -void ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S +void ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S ( const struct itimerspec *itimer, rtems_time_of_day *rtems_time ) { unsigned long int seconds; /* The leap years and the months with 28, 29 or 31 days have not been - * considerated. It will be made in the future */ + * considerated. It will be made in the future */ seconds = itimer->it_value.tv_sec; @@ -182,23 +182,23 @@ void ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S /* *************************************************************************** - * FIRE_TIMER_S + * FIRE_TIMER_S * * Description: This is the operation that is ran when a timer expires * ***************************************************************************/ -rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) +rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) { - int timer_pos; /* Position in the table of the timer that + int timer_pos; /* Position in the table of the timer that * has expirated */ rtems_status_code return_v; /* Return value of rtems_timer_fire_after */ int sig_number; /* Number of the signal to send */ - - /* The position of the table of timers that contains the data of the + + /* The position of the table of timers that contains the data of the * expired timer will be stored in "timer_pos". In theory a timer can not - * expire if it has not been created or has been deleted */ + * expire if it has not been created or has been deleted */ timer_pos = TIMER_POSITION_F(timer); @@ -211,27 +211,27 @@ rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) /* The timer must be reprogrammed */ - return_v = rtems_timer_fire_after ( timer, - timer_struct[timer_pos].ticks, - FIRE_TIMER_S, + return_v = rtems_timer_fire_after ( timer, + timer_struct[timer_pos].ticks, + FIRE_TIMER_S, NULL ); - /* Stores the time when the timer was started again */ + /* Stores the time when the timer was started again */ timer_struct[timer_pos].time = _TOD_Current; - + /* The state has not to be actualized, because nothing modifies it */ timer_struct[timer_pos].state = STATE_CREATE_RUN_C; } else { /* Indicates that the timer is stopped */ - + timer_struct[timer_pos].state = STATE_CREATE_STOP_C; } - /* + /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ @@ -241,7 +241,7 @@ rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) if( pthread_kill ( timer_struct[timer_pos].thread_id , timer_struct[timer_pos].inf.sigev_signo ) ) { /* XXX error handling */ - } + } /* * After the signal handler returns, the count of expirations of the @@ -252,7 +252,7 @@ rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) } -/* ********************************************************************* +/* ********************************************************************* * 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264 * ********************************************************************/ @@ -271,20 +271,20 @@ int timer_create( rtems_id timer_id; /* created timer identifier */ int timer_pos; /* Position in the table of timers */ - /* + /* * The data of the structure evp are checked in order to verify if they - * are coherent. + * are coherent. */ if (evp != NULL) { /* The structure has data */ - if ( ( evp->sigev_notify != SIGEV_NONE ) && + if ( ( evp->sigev_notify != SIGEV_NONE ) && ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } } - + /* * A timer is created using the primitive rtems_timer_create */ @@ -292,18 +292,18 @@ int timer_create( return_v = rtems_timer_create ( clock_id, &timer_id ); switch (return_v) { - case RTEMS_SUCCESSFUL : + case RTEMS_SUCCESSFUL : /* * The timer has been created properly */ - + /* Obtains the first free position in the table of timers */ timer_pos = FIRST_FREE_POSITION_F(); if ( timer_pos == NO_MORE_TIMERS_C ) { - /* There is not position for another timers in spite of RTEMS + /* There is not position for another timers in spite of RTEMS * supports it. It will necessaty to increase the structure used */ rtems_set_errno_and_return_minus_one( EAGAIN ); @@ -319,7 +319,7 @@ int timer_create( /* NEW VERSION*/ timer_struct[timer_pos].thread_id = pthread_self (); - + if ( evp != NULL ) { timer_struct[timer_pos].inf.sigev_notify = evp->sigev_notify; timer_struct[timer_pos].inf.sigev_signo = evp->sigev_signo; @@ -344,20 +344,20 @@ int timer_create( /* There has been created too much timers for the same process */ rtems_set_errno_and_return_minus_one( EAGAIN ); - + default : /* * Does nothing. It only returns the error without assigning a value * to errno. In theory, it can not happen because the call to - * rtems_timer_create can not return other different value. + * rtems_timer_create can not return other different value. */ rtems_set_errno_and_return_minus_one( EINVAL ); } - /* - * The next sentence is used to avoid singular situations + /* + * The next sentence is used to avoid singular situations */ rtems_set_errno_and_return_minus_one( EINVAL ); @@ -371,13 +371,13 @@ int timer_delete( timer_t timerid ) { - + /* * IDEA: This function must probably stop the timer first and then delete it * * It will have to do a call to rtems_timer_cancel and then another * call to rtems_timer_delete. - * The call to rtems_timer_delete will be probably unnecessary, + * The call to rtems_timer_delete will be probably unnecessary, * because rtems_timer_delete stops the timer before deleting it. */ @@ -429,7 +429,7 @@ int timer_settime( rtems_status_code return_v; /* Return of the calls to RTEMS */ int timer_pos; /* Position of the timer in the table */ rtems_time_of_day rtems_time; /* Time in RTEMS */ - + /* First the position in the table of timers is obtained */ @@ -448,7 +448,7 @@ int timer_settime( } /* If the function reaches this point, then it will be necessary to do - * something with the structure of times of the timer: to stop, start + * something with the structure of times of the timer: to stop, start * or start it again */ /* First, it verifies if the timer must be stopped */ @@ -468,7 +468,7 @@ int timer_settime( timer_struct[timer_pos].timer_data = *value; /* Indicates that the timer is created and stopped */ - + timer_struct[timer_pos].state = STATE_CREATE_STOP_C; /* Returns with success */ @@ -476,11 +476,11 @@ int timer_settime( return 0; } - /* + /* * If the function reaches this point, then the timer will have to be - * initialized with new values: to start it or start it again + * initialized with new values: to start it or start it again */ - + /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec > MAX_NSEC_C ) || @@ -493,7 +493,7 @@ int timer_settime( /* Then, "value" must be converted from seconds and nanoseconds to clock * ticks, to use it in the calls to RTEMS */ - /* It is also necessary to take in account if the time is absolute + /* It is also necessary to take in account if the time is absolute * or relative */ switch (flags) { @@ -513,14 +513,14 @@ int timer_settime( /* The timer has been started and is running */ - /* Actualizes the data of the structure and + /* Actualizes the data of the structure and * returns the old ones in "ovalue" */ if ( ovalue ) *ovalue = timer_struct[timer_pos].timer_data; timer_struct[timer_pos].timer_data = *value; - + /* It indicates that the time is running */ timer_struct[timer_pos].state = STATE_CREATE_RUN_C; @@ -549,9 +549,9 @@ int timer_settime( default: break; - + } - + break; case TIMER_RELATIVE_C: @@ -561,23 +561,23 @@ int timer_settime( /* First, it converts from seconds and nanoseconds to ticks */ - /* The form in which this operation is done can produce a lost + /* The form in which this operation is done can produce a lost * of precision of 1 second */ - + /* This is the process to convert from nanoseconds to ticks * - * There is a tick every 10 miliseconds, then the nanoseconds are + * There is a tick every 10 miliseconds, then the nanoseconds are * divided between 10**7. The result of this operation will be the - * number of ticks + * number of ticks */ - timer_struct[timer_pos].ticks = + timer_struct[timer_pos].ticks = ( SEC_TO_TICKS_C * value->it_value.tv_sec ) + ( value->it_value.tv_nsec / (NSEC_PER_SEC_C / SEC_TO_TICKS_C)); - return_v = rtems_timer_fire_after ( timerid, - timer_struct[timer_pos].ticks, - FIRE_TIMER_S, + return_v = rtems_timer_fire_after ( timerid, + timer_struct[timer_pos].ticks, + FIRE_TIMER_S, NULL ); switch (return_v) { @@ -585,14 +585,14 @@ int timer_settime( /* The timer has been started and is running */ - /* Actualizes the data of the structure and + /* Actualizes the data of the structure and * returns the old ones in "ovalue" */ if ( ovalue ) *ovalue = timer_struct[timer_pos].timer_data; timer_struct[timer_pos].timer_data = *value; - + /* It indicates that the time is running */ timer_struct[timer_pos].state = STATE_CREATE_RUN_C; @@ -600,15 +600,15 @@ int timer_settime( /* Stores the time in which the timer was started again */ timer_struct[timer_pos].time = _TOD_Current; - + return 0; break; case RTEMS_INVALID_ID: - /* The timer identifier is not correct. In theory, this - * situation can not occur, but the solution is easy */ + /* The timer identifier is not correct. In theory, this + * situation can not occur, but the solution is easy */ rtems_set_errno_and_return_minus_one( EINVAL ); @@ -620,14 +620,14 @@ int timer_settime( * are incorrect */ /* - * I do not know if errno must be actualized + * I do not know if errno must be actualized * * errno = EINVAL; */ rtems_set_errno_and_return_minus_one( EINVAL ); break; - + default: break; } @@ -635,7 +635,7 @@ int timer_settime( default: break; - /* It does nothing, although it will be probably necessary to + /* It does nothing, although it will be probably necessary to * return an error */ } @@ -658,18 +658,18 @@ int timer_gettime( ) { - /* + /* * IDEA: This function does not use functions of RTEMS to the handle * of timers. It uses some functions for managing the time. * * A possible form to do this is the following: * - * - When a timer is initialized, the value of the time in + * - When a timer is initialized, the value of the time in * that moment is stored. * - When this function is called, it returns the difference * between the current time and the initialization time. */ - + rtems_time_of_day current_time; int timer_pos; uint32_t hours; @@ -677,7 +677,7 @@ int timer_gettime( uint32_t seconds; uint32_t ticks; uint32_t nanosec; - + /* Reads the current time */ @@ -686,7 +686,7 @@ int timer_gettime( timer_pos = TIMER_POSITION_F ( timerid ); if ( timer_pos == BAD_TIMER_C ) { - /* The timer identifier is erroneus */ + /* The timer identifier is erroneus */ rtems_set_errno_and_return_minus_one( EINVAL ); } @@ -701,45 +701,45 @@ int timer_gettime( } else { minutes = current_time.minute - timer_struct[timer_pos].time.minute; } - + if ( current_time.second < timer_struct[timer_pos].time.second ) { seconds = 60 - timer_struct[timer_pos].time.second + current_time.second; minutes--; } else { - seconds = current_time.second - timer_struct[timer_pos].time.second; + seconds = current_time.second - timer_struct[timer_pos].time.second; } if ( current_time.ticks < timer_struct[timer_pos].time.ticks ) { ticks = 100 - timer_struct[timer_pos].time.ticks + current_time.ticks; seconds--; } else { - ticks = current_time.ticks - timer_struct[timer_pos].time.ticks; + ticks = current_time.ticks - timer_struct[timer_pos].time.ticks; } /* The time that the timer is running is calculated */ seconds = hours * 60 * 60 + minutes * 60 + - seconds; + seconds; nanosec = ticks * 10 * /* msec */ 1000 * /* microsec */ 1000; /* nanosec */ - + /* Calculates the time left before the timer finishes */ - - value->it_value.tv_sec = + + value->it_value.tv_sec = timer_struct[timer_pos].timer_data.it_value.tv_sec - seconds; - - value->it_value.tv_nsec = + + value->it_value.tv_nsec = timer_struct[timer_pos].timer_data.it_value.tv_nsec - nanosec; - value->it_interval.tv_sec = + value->it_interval.tv_sec = timer_struct[timer_pos].timer_data.it_interval.tv_sec; - value->it_interval.tv_nsec = + value->it_interval.tv_nsec = timer_struct[timer_pos].timer_data.it_interval.tv_nsec; - + return 0; @@ -760,9 +760,9 @@ int timer_getoverrun( /* * IDEA: This function must count the times the timer expires. - * + * * The expiration of a timer must increase by one a counter. - * After the signal handler associated to the timer finishs + * After the signal handler associated to the timer finishs * its execution, FIRE_TIMER_S will have to set this counter to 0. */ diff --git a/cpukit/posix/src/sched.c b/cpukit/posix/src/sched.c index a0eb62acdd..13b8db2a71 100644 --- a/cpukit/posix/src/sched.c +++ b/cpukit/posix/src/sched.c @@ -46,7 +46,7 @@ int sched_getparam( /*PAGE * - * 13.3.3 Set Scheduling Policy and Scheduling Parameters, + * 13.3.3 Set Scheduling Policy and Scheduling Parameters, * P1003.1b-1993, p. 254 */ @@ -86,7 +86,7 @@ int sched_get_priority_max( case SCHED_RR: case SCHED_SPORADIC: break; - + default: rtems_set_errno_and_return_minus_one( EINVAL ); } @@ -109,7 +109,7 @@ int sched_get_priority_min( case SCHED_RR: case SCHED_SPORADIC: break; - + default: rtems_set_errno_and_return_minus_one( EINVAL ); } diff --git a/cpukit/posix/src/semaphore.c b/cpukit/posix/src/semaphore.c index 9f06e01c1b..3ec96d8366 100644 --- a/cpukit/posix/src/semaphore.c +++ b/cpukit/posix/src/semaphore.c @@ -31,7 +31,7 @@ * * Output parameters: NONE */ - + void _POSIX_Semaphore_Manager_initialization( uint32_t maximum_semaphores ) diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c index 86b1179660..64d8f435b0 100644 --- a/cpukit/posix/src/semaphorecreatesupp.c +++ b/cpukit/posix/src/semaphorecreatesupp.c @@ -41,7 +41,7 @@ int _POSIX_Semaphore_Create_support( CORE_semaphore_Attributes *the_sem_attr; _Thread_Disable_dispatch(); - + /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); @@ -49,19 +49,19 @@ int _POSIX_Semaphore_Create_support( } if ( name ) { - if( strlen(name) > PATH_MAX ) { + if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); } } the_semaphore = _POSIX_Semaphore_Allocate(); - + if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } - + #if defined(RTEMS_MULTIPROCESSING) if ( pshared == PTHREAD_PROCESS_SHARED && !( _Objects_MP_Allocate_and_open( &_POSIX_Semaphore_Information, 0, @@ -71,7 +71,7 @@ int _POSIX_Semaphore_Create_support( rtems_set_errno_and_return_minus_one( EAGAIN ); } #endif - + the_semaphore->process_shared = pshared; if ( name ) { @@ -79,16 +79,16 @@ int _POSIX_Semaphore_Create_support( the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } - else + else the_semaphore->named = FALSE; the_sem_attr = &the_semaphore->Semaphore.Attributes; - + /* - * POSIX does not appear to specify what the discipline for - * blocking tasks on this semaphore should be. It could somehow + * POSIX does not appear to specify what the discipline for + * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One - * thing is certain, no matter what we decide, it won't be + * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ @@ -105,15 +105,15 @@ int _POSIX_Semaphore_Create_support( /* * Make the semaphore available for use. */ - + _Objects_Open( &_POSIX_Semaphore_Information, &the_semaphore->Object, (char *) name ); - + *the_sem = the_semaphore; - + #if defined(RTEMS_MULTIPROCESSING) if ( pshared == PTHREAD_PROCESS_SHARED ) _POSIX_Semaphore_MP_Send_process_packet( @@ -123,7 +123,7 @@ int _POSIX_Semaphore_Create_support( 0 /* proxy id - Not used */ ); #endif - + _Thread_Enable_dispatch(); return 0; } diff --git a/cpukit/posix/src/semaphoredeletesupp.c b/cpukit/posix/src/semaphoredeletesupp.c index a0d8e5ea12..44b00fcd67 100644 --- a/cpukit/posix/src/semaphoredeletesupp.c +++ b/cpukit/posix/src/semaphoredeletesupp.c @@ -31,7 +31,7 @@ void _POSIX_Semaphore_Delete( { if ( !the_semaphore->linked && !the_semaphore->open_count ) { _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object ); - + _CORE_semaphore_Flush( &the_semaphore->Semaphore, #if defined(RTEMS_MULTIPROCESSING) diff --git a/cpukit/posix/src/semaphorenametoid.c b/cpukit/posix/src/semaphorenametoid.c index 206c883976..eb1a4686cf 100644 --- a/cpukit/posix/src/semaphorenametoid.c +++ b/cpukit/posix/src/semaphorenametoid.c @@ -41,7 +41,7 @@ int _POSIX_Semaphore_Name_to_id( if ( !name[0] ) return EINVAL; - status = _Objects_Name_to_id( + status = _Objects_Name_to_id( &_POSIX_Semaphore_Information, (char *)name, 0, (Objects_Id*)id ); if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c index d3fd9787ce..7c76ff87bd 100644 --- a/cpukit/posix/src/semaphorewaitsupp.c +++ b/cpukit/posix/src/semaphorewaitsupp.c @@ -33,7 +33,7 @@ int _POSIX_Semaphore_Wait_support( { register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; - + the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/semclose.c b/cpukit/posix/src/semclose.c index a0e786ba27..83b72f36e0 100644 --- a/cpukit/posix/src/semclose.c +++ b/cpukit/posix/src/semclose.c @@ -24,9 +24,9 @@ /*PAGE * * sem_close - * + * * Routine to close a semaphore that has been opened or initialized. - * + * * 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224 */ @@ -36,7 +36,7 @@ int sem_close( { register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; - + the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/semdestroy.c b/cpukit/posix/src/semdestroy.c index 01ea1606e0..2daccce17c 100644 --- a/cpukit/posix/src/semdestroy.c +++ b/cpukit/posix/src/semdestroy.c @@ -31,7 +31,7 @@ int sem_destroy( { register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; - + the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: @@ -49,7 +49,7 @@ int sem_destroy( _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } - + _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; diff --git a/cpukit/posix/src/semgetvalue.c b/cpukit/posix/src/semgetvalue.c index 71a99df73e..e2bf9f83b2 100644 --- a/cpukit/posix/src/semgetvalue.c +++ b/cpukit/posix/src/semgetvalue.c @@ -32,7 +32,7 @@ int sem_getvalue( { register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; - + the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/seminit.c b/cpukit/posix/src/seminit.c index 0635ebea0f..449f2c1c01 100644 --- a/cpukit/posix/src/seminit.c +++ b/cpukit/posix/src/seminit.c @@ -36,14 +36,14 @@ int sem_init( if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); - + status = _POSIX_Semaphore_Create_support( NULL, pshared, value, &the_semaphore ); - + if ( status != -1 ) *sem = the_semaphore->Object.id; diff --git a/cpukit/posix/src/semopen.c b/cpukit/posix/src/semopen.c index 25808893ad..522177d3b0 100644 --- a/cpukit/posix/src/semopen.c +++ b/cpukit/posix/src/semopen.c @@ -23,13 +23,13 @@ /*PAGE * * sem_open - * + * * Opens a named semaphore. Used in conjunction with the sem_close * and sem_unlink commands. * * 11.2.3 Initialize/Open a Named Semaphore, P1003.1b-1993, p.221 * - * NOTE: When oflag is O_CREAT, then optional third and fourth + * NOTE: When oflag is O_CREAT, then optional third and fourth * parameters must be present. */ @@ -48,7 +48,7 @@ sem_t *sem_open( sem_t the_semaphore_id; POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; - + _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { @@ -59,7 +59,7 @@ sem_t *sem_open( } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); - + /* * If the name to id translation worked, then the semaphore exists * and we can just return a pointer to the id. Otherwise we may @@ -78,7 +78,7 @@ sem_t *sem_open( _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); } - } else { + } else { /* * Check for existence with creation. @@ -95,9 +95,9 @@ sem_t *sem_open( _Thread_Enable_dispatch(); return (sem_t *)&the_semaphore->Object.id; - } - - /* + } + + /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ @@ -108,7 +108,7 @@ sem_t *sem_open( value, &the_semaphore ); - + /* * errno was set by Create_support, so don't set it again. */ diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c index 187e511253..a4d7a36876 100644 --- a/cpukit/posix/src/sempost.c +++ b/cpukit/posix/src/sempost.c @@ -31,7 +31,7 @@ int sem_post( { register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; - + the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: diff --git a/cpukit/posix/src/semunlink.c b/cpukit/posix/src/semunlink.c index 81ba417dbf..b694ea19f9 100644 --- a/cpukit/posix/src/semunlink.c +++ b/cpukit/posix/src/semunlink.c @@ -23,7 +23,7 @@ /*PAGE * * sem_unlink - * + * * Unlinks a named semaphore, sem_close must also be called to remove * the semaphore. * @@ -37,7 +37,7 @@ int sem_unlink( int status; register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; - + _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); @@ -59,7 +59,7 @@ int sem_unlink( &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); - + #if defined(RTEMS_MULTIPROCESSING) if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) { _Objects_MP_Close( &_POSIX_Semaphore_Information, the_semaphore_id ); diff --git a/cpukit/posix/src/setcancelstate.c b/cpukit/posix/src/setcancelstate.c index 4a2fb1f93f..94050bfc91 100644 --- a/cpukit/posix/src/setcancelstate.c +++ b/cpukit/posix/src/setcancelstate.c @@ -23,7 +23,7 @@ * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ -int pthread_setcancelstate( +int pthread_setcancelstate( int state, int *oldstate ) @@ -36,7 +36,7 @@ int pthread_setcancelstate( * and the ISR context is not a thread. */ - if ( _ISR_Is_in_progress() ) + if ( _ISR_Is_in_progress() ) return EPROTO; if ( !oldstate ) @@ -46,16 +46,16 @@ int pthread_setcancelstate( return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; - + _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; - - 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->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); _Thread_Enable_dispatch(); - + return 0; } diff --git a/cpukit/posix/src/setcanceltype.c b/cpukit/posix/src/setcanceltype.c index aff7d84dda..a7b7655f1d 100644 --- a/cpukit/posix/src/setcanceltype.c +++ b/cpukit/posix/src/setcanceltype.c @@ -29,29 +29,29 @@ int pthread_setcanceltype( ) { POSIX_API_Control *thread_support; - + /* * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ - if ( _ISR_Is_in_progress() ) + if ( _ISR_Is_in_progress() ) return EPROTO; if ( !oldtype ) return EINVAL; - + if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; - + thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; - 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->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c index eb4bc7e2a7..b986d97ba1 100644 --- a/cpukit/posix/src/sigaction.c +++ b/cpukit/posix/src/sigaction.c @@ -47,8 +47,8 @@ int sigaction( if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); - - /* + + /* * Some signals cannot be ignored (P1003.1b-1993, pp. 70-72 and references. * * NOTE: Solaris documentation claims to "silently enforce" this which @@ -57,7 +57,7 @@ int sigaction( if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); - + /* * Evaluate the new action structure and set the global signal vector * appropriately. @@ -83,7 +83,7 @@ int sigaction( /* * No need to evaluate or dispatch because: * - * + If we were ignoring the signal before, none could be pending + * + If we were ignoring the signal before, none could be pending * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c index 687883fefd..1486be3054 100644 --- a/cpukit/posix/src/sigtimedwait.c +++ b/cpukit/posix/src/sigtimedwait.c @@ -60,7 +60,7 @@ int sigtimedwait( siginfo_t *the_info; int signo; ISR_Level level; - + /* * Error check parameters before disabling interrupts. */ @@ -124,9 +124,9 @@ int sigtimedwait( the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; - _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); + _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); - _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); + _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); _Thread_Enable_dispatch(); /* diff --git a/cpukit/posix/src/testcancel.c b/cpukit/posix/src/testcancel.c index 08a423747f..8d80794e2d 100644 --- a/cpukit/posix/src/testcancel.c +++ b/cpukit/posix/src/testcancel.c @@ -33,11 +33,11 @@ void pthread_testcancel( void ) * and the ISR context is not a thread. */ - if ( _ISR_Is_in_progress() ) + if ( _ISR_Is_in_progress() ) return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; - + _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) diff --git a/cpukit/posix/src/time.c b/cpukit/posix/src/time.c index 081f5c6d59..69592b7318 100644 --- a/cpukit/posix/src/time.c +++ b/cpukit/posix/src/time.c @@ -41,7 +41,7 @@ time_t time( */ seconds_since_epoch = _TOD_Seconds_since_epoch; - + seconds_since_epoch += POSIX_TIME_SECONDS_1970_THROUGH_1988; if ( tloc ) diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c index 8eab97ab17..ab268d105c 100644 --- a/cpukit/posix/src/ualarm.c +++ b/cpukit/posix/src/ualarm.c @@ -29,7 +29,7 @@ Watchdog_Control _POSIX_signals_Ualarm_timer; * * _POSIX_signals_Ualarm_TSR */ - + void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument @@ -73,7 +73,7 @@ useconds_t ualarm( * this. */ - + ticks = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / _TOD_Ticks_per_second); diff --git a/cpukit/posix/src/wait.c b/cpukit/posix/src/wait.c index 09dfd3ded7..5bfa8ce943 100644 --- a/cpukit/posix/src/wait.c +++ b/cpukit/posix/src/wait.c @@ -1,4 +1,4 @@ -/* +/* * waitpid() - POSIX 1003.1b 3.2.1 * * $Id$ diff --git a/cpukit/posix/src/waitpid.c b/cpukit/posix/src/waitpid.c index aece9bbb81..5201f56a05 100644 --- a/cpukit/posix/src/waitpid.c +++ b/cpukit/posix/src/waitpid.c @@ -1,4 +1,4 @@ -/* +/* * waitpid() - POSIX 1003.1 3.2.1 * * $Id$ -- cgit v1.2.3