Changeset 874297f3 in rtems


Ignore:
Timestamp:
04/16/04 10:01:03 (19 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
27138f3
Parents:
1b4f2b30
Message:

Remove stray white spaces.

Location:
cpukit/posix
Files:
126 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/include/aio.h

    r1b4f2b30 r874297f3  
    1616
    1717/*
    18  *  6.7.1 Data Definitions for Asynchronous Input and Output, 
     18 *  6.7.1 Data Definitions for Asynchronous Input and Output,
    1919 *        P1003.1b-1993, p. 151
    2020 */
     
    9696
    9797/*
    98  *  6.7.6 Retrieve Return Status of Asynchronous I/O Operation, 
     98 *  6.7.6 Retrieve Return Status of Asynchronous I/O Operation,
    9999 *        P1003.1b-1993, p. 162
    100100 */
  • cpukit/posix/include/intr.h

    r1b4f2b30 r874297f3  
    5757  intr_t  intr
    5858);
    59  
     59
    6060int intr_unlock(
    6161  intr_t  intr
    6262);
    63  
     63
    6464/*
    6565 *  22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
  • cpukit/posix/include/mqueue.h

    r1b4f2b30 r874297f3  
    6969  const char   *msg_ptr,
    7070  size_t        msg_len,
    71   unsigned int  msg_prio 
     71  unsigned int  msg_prio
    7272);
    7373
     
    114114
    115115/*
    116  *  15.2.6 Notify Process that a Message is Available on a Queue, 
     116 *  15.2.6 Notify Process that a Message is Available on a Queue,
    117117 *         P1003.1b-1993, p. 280
    118118 */
  • cpukit/posix/include/rtems/posix/cond.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_h
    1717#define __RTEMS_POSIX_CONDITION_VARIABLES_h
    18  
     18
    1919#ifdef __cplusplus
    2020extern "C" {
     
    3434 *  Data Structure used to manage a POSIX condition variable
    3535 */
    36  
     36
    3737typedef struct {
    3838   Objects_Control       Object;
     
    4646 *  this class of objects.
    4747 */
    48  
     48
    4949POSIX_EXTERN Objects_Information  _POSIX_Condition_variables_Information;
    5050
     
    5454
    5555extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
    56  
     56
    5757/*
    5858 *  _POSIX_Condition_variables_Manager_initialization
     
    6262 *  This routine performs the initialization necessary for this manager.
    6363 */
    64  
     64
    6565void _POSIX_Condition_variables_Manager_initialization(
    6666  uint32_t   maximum_condition_variables
    6767);
    68  
     68
    6969/*
    7070 *  _POSIX_Condition_variables_Allocate
     
    7575 *  the inactive chain of free condition variable control blocks.
    7676 */
    77  
    78 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * 
     77
     78RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *
    7979  _POSIX_Condition_variables_Allocate( void );
    80  
     80
    8181/*
    8282 *  _POSIX_Condition_variables_Free
     
    8787 *  inactive chain of free condition variable control blocks.
    8888 */
    89  
     89
    9090RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
    9191  POSIX_Condition_variables_Control *the_condition_variable
    9292);
    93  
     93
    9494/*
    9595 *  _POSIX_Condition_variables_Get
     
    9797 *  DESCRIPTION:
    9898 *
    99  *  This function maps condition variable IDs to condition variable control 
     99 *  This function maps condition variable IDs to condition variable control
    100100 *  blocks.  If ID corresponds to a local condition variable, then it returns
    101101 *  the_condition variable control pointer which maps to ID and location
     
    105105 *  to OBJECTS_ERROR and the_condition variable is undefined.
    106106 */
    107  
     107
    108108#if 0
    109109RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
     
    112112);
    113113#endif
    114  
     114
    115115/*
    116116 *  _POSIX_Condition_variables_Is_null
     
    118118 *  DESCRIPTION:
    119119 *
    120  *  This function returns TRUE if the_condition variable is NULL 
     120 *  This function returns TRUE if the_condition variable is NULL
    121121 *  and FALSE otherwise.
    122122 */
    123  
     123
    124124RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
    125125  POSIX_Condition_variables_Control *the_condition_variable
     
    164164}
    165165#endif
    166  
     166
    167167#endif
    168168/*  end of include file */
  • cpukit/posix/include/rtems/posix/intr.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __RTEMS_POSIX_KEY_h
    1717#define __RTEMS_POSIX_KEY_h
    18  
     18
    1919#ifdef __cplusplus
    2020extern "C" {
     
    3434  Chain_Control  Handlers;
    3535} POSIX_Interrupt_Control;
    36  
     36
    3737/*
    3838 *  Data Structure used to manage a POSIX Interrupt Handler
    3939 */
    40  
     40
    4141typedef struct {
    4242  Objects_Control         Object;
    43   int                     is_active; 
    44   intr_t                  vector; 
     43  int                     is_active;
     44  intr_t                  vector;
    4545  Thread_Control         *server;
    4646  int                   (*handler)( void *area );
     
    5252 *  this class of objects.
    5353 */
    54  
     54
    5555POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information;
    5656
     
    6060 */
    6161
    62 POSIX_EXTERN POSIX_Interrupt_Control 
     62POSIX_EXTERN POSIX_Interrupt_Control
    6363               _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ];
    64  
     64
    6565/*
    6666 *  _POSIX_Interrupt_Manager_initialization
     
    7070 *  This routine performs the initialization necessary for this manager.
    7171 */
    72  
    73 void _POSIX_Interrupt_Manager_initialization( 
     72
     73void _POSIX_Interrupt_Manager_initialization(
    7474  uint32_t    maximum_interrupt_handlers
    7575);
    76  
     76
    7777/*
    7878 *  _POSIX_Interrupt_Allocate
     
    8383 *  the inactive chain of free interrupt handler control blocks.
    8484 */
    85  
     85
    8686RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control *
    8787  _POSIX_Interrupt_Allocate( void );
    88  
     88
    8989/*
    9090 *  _POSIX_Interrupt_Free
     
    9595 *  inactive chain of free interrupt handler control blocks.
    9696 */
    97  
     97
    9898RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free (
    9999  POSIX_Interrupt_Handler_control *the_intr
    100100);
    101  
     101
    102102/*
    103103 *  _POSIX_Interrupt_Get
     
    105105 *  DESCRIPTION:
    106106 *
    107  *  This function maps interrupt handler IDs to interrupt handler control 
     107 *  This function maps interrupt handler IDs to interrupt handler control
    108108 *  blocks.  If ID corresponds to a local interrupt handler, then it returns
    109109 *  the_intr control pointer which maps to ID and location
     
    113113 *  to OBJECTS_ERROR and the_intr is undefined.
    114114 */
    115  
     115
    116116RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get (
    117117  Objects_Id         id,
    118118  Objects_Locations *location
    119119);
    120  
     120
    121121/*
    122122 *  _POSIX_Interrupt_Is_null
     
    126126 *  This function returns TRUE if the_intr is NULL and FALSE otherwise.
    127127 */
    128  
     128
    129129RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null (
    130130  POSIX_Interrupt_Handler_control *the_intr
    131131);
    132  
     132
    133133/*
    134134 *  _POSIX_Interrupt_Handler
     
    138138 *  This function XXX.
    139139 */
    140  
     140
    141141void _POSIX_Interrupt_Handler(
    142142  ISR_Vector_number   vector
     
    148148}
    149149#endif
    150  
     150
    151151#endif
    152152/*  end of include file */
  • cpukit/posix/include/rtems/posix/key.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __RTEMS_POSIX_KEY_h
    1717#define __RTEMS_POSIX_KEY_h
    18  
     18
    1919#ifdef __cplusplus
    2020extern "C" {
     
    2727 *         ID of the currently executing thread.
    2828 */
    29  
     29
    3030typedef struct {
    3131   Objects_Control     Object;
     
    3939 *  this class of objects.
    4040 */
    41  
     41
    4242POSIX_EXTERN Objects_Information  _POSIX_Keys_Information;
    43  
     43
    4444/*
    4545 *  _POSIX_Keys_Manager_initialization
     
    4949 *  This routine performs the initialization necessary for this manager.
    5050 */
    51  
     51
    5252void _POSIX_Key_Manager_initialization(
    5353  uint32_t   maximum_keys
    5454);
    55  
     55
    5656/*
    5757 *  _POSIX_Keys_Run_destructors
     
    6565 *         run through all the keys and do the destructor action.
    6666 */
    67  
     67
    6868void _POSIX_Keys_Run_destructors(
    6969  Thread_Control *thread
     
    7878 *  the inactive chain of free keys control blocks.
    7979 */
    80  
     80
    8181RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void );
    82  
     82
    8383/*
    8484 *  _POSIX_Keys_Free
     
    8989 *  inactive chain of free keys control blocks.
    9090 */
    91  
     91
    9292RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
    9393  POSIX_Keys_Control *the_key
    9494);
    95  
     95
    9696/*
    9797 *  _POSIX_Keys_Get
     
    107107 *  to OBJECTS_ERROR and the_key is undefined.
    108108 */
    109  
     109
    110110RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
    111111  Objects_Id         id,
    112112  Objects_Locations *location
    113113);
    114  
     114
    115115/*
    116116 *  _POSIX_Keys_Is_null
     
    120120 *  This function returns TRUE if the_key is NULL and FALSE otherwise.
    121121 */
    122  
     122
    123123RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null (
    124124  POSIX_Keys_Control *the_key
     
    130130}
    131131#endif
    132  
     132
    133133#endif
    134134/*  end of include file */
  • cpukit/posix/include/rtems/posix/mqueue.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_h
    1717#define __RTEMS_POSIX_MESSAGE_QUEUE_h
    18  
     18
    1919#ifdef __cplusplus
    2020extern "C" {
     
    2929 *  Data Structure used to manage a POSIX message queue
    3030 */
    31  
     31
    3232typedef struct {
    3333   Objects_Control             Object;
     
    5151 *  of "file descriptors" associated with the message queues.
    5252 */
    53  
     53
    5454POSIX_EXTERN Objects_Information  _POSIX_Message_queue_Information;
    5555POSIX_EXTERN Objects_Information  _POSIX_Message_queue_Information_fds;
    56  
     56
    5757/*
    5858 *  _POSIX_Message_queue_Manager_initialization
     
    6262 *  This routine performs the initialization necessary for this manager.
    6363 */
    64  
     64
    6565void _POSIX_Message_queue_Manager_initialization(
    6666  uint32_t   maximum_message_queues
    6767);
    68  
     68
    6969/*
    7070 *
     
    7676 *  core message queue.
    7777 */
    78  
     78
    7979int _POSIX_Message_queue_Create_support(
    8080  const char                    *name,
     
    9191 *  This routine supports the mq_unlink and mq_close routines by
    9292 *  doing most of the work involved with removing a message queue.
    93  */ 
    94  
     93 */
     94
    9595void _POSIX_Message_queue_Delete(
    9696  POSIX_Message_queue_Control *the_mq
     
    137137 *  the inactive chain of free message queue control blocks.
    138138 */
    139  
     139
    140140RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void );
    141  
     141
    142142/*
    143143 *  _POSIX_Message_queue_Free
     
    148148 *  inactive chain of free message queue control blocks.
    149149 */
    150  
     150
    151151RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
    152152  POSIX_Message_queue_Control *the_mq
    153153);
    154  
     154
    155155/*
    156156 *  _POSIX_Message_queue_Get
     
    166166 *  to OBJECTS_ERROR and the_mq is undefined.
    167167 */
    168  
     168
    169169RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
    170170  Objects_Id         id,
    171171  Objects_Locations *location
    172172);
    173  
     173
    174174/*
    175175 *  _POSIX_Message_queue_Is_null
     
    179179 *  This function returns TRUE if the_message_queue is NULL and FALSE otherwise.
    180180 */
    181  
     181
    182182RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null (
    183183  POSIX_Message_queue_Control *the_mq
     
    200200/*
    201201 *  _POSIX_Message_queue_Priority_to_core
    202  * 
     202 *
    203203 *  DESCRIPTION:
    204204 *
    205205 *  XXX
    206206 */
    207  
     207
    208208RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
    209209  unsigned int priority
     
    212212/*
    213213 *  _POSIX_Message_queue_Priority_from_core
    214  * 
     214 *
    215215 *  DESCRIPTION:
    216216 *
    217217 *  XXX
    218218 */
    219  
     219
    220220RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
    221221  CORE_message_queue_Submit_types priority
     
    244244}
    245245#endif
    246  
     246
    247247#endif
    248248/*  end of include file */
  • cpukit/posix/include/rtems/posix/mutex.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __RTEMS_POSIX_MUTEX_h
    1717#define __RTEMS_POSIX_MUTEX_h
    18  
     18
    1919#ifdef __cplusplus
    2020extern "C" {
     
    2727 *  Data Structure used to manage a POSIX mutex
    2828 */
    29  
     29
    3030typedef struct {
    3131   Objects_Control     Object;
     
    3838 *  this class of objects.
    3939 */
    40  
     40
    4141POSIX_EXTERN Objects_Information  _POSIX_Mutex_Information;
    4242
     
    4646
    4747extern const pthread_mutexattr_t _POSIX_Mutex_Default_attributes;
    48  
     48
    4949/*
    5050 *  _POSIX_Mutex_Manager_initialization
     
    5454 *  This routine performs the initialization necessary for this manager.
    5555 */
    56  
     56
    5757void _POSIX_Mutex_Manager_initialization(
    5858  uint32_t   maximum_mutexes
    5959);
    60  
     60
    6161/*
    6262 *  _POSIX_Mutex_Allocate
     
    6767 *  the inactive chain of free mutexes control blocks.
    6868 */
    69  
     69
    7070RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void );
    71  
     71
    7272/*
    7373 *  _POSIX_Mutex_Free
     
    7878 *  inactive chain of free mutexes control blocks.
    7979 */
    80  
     80
    8181RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
    8282  POSIX_Mutex_Control *the_mutex
    8383);
    84  
     84
    8585#if 0
    8686/*
     
    9797 *  to OBJECTS_ERROR and the_mutex is undefined.
    9898 */
    99  
     99
    100100RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
    101101  Objects_Id        *id,
    102102  Objects_Locations *location
    103103);
    104  
     104
    105105/*
    106106 *  _POSIX_Mutex_Is_null
     
    110110 *  This function returns TRUE if the_mutex is NULL and FALSE otherwise.
    111111 */
    112  
     112
    113113RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
    114114  POSIX_Mutex_Control *the_mutex
     
    120120 *
    121121 *  DESCRIPTION:
    122  * 
     122 *
    123123 *  A support routine which implements guts of the blocking, non-blocking, and
    124124 *  timed wait version of mutex lock.
     
    153153}
    154154#endif
    155  
     155
    156156#endif
    157157/*  end of include file */
  • cpukit/posix/include/rtems/posix/posixapi.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __POSIX_API_h
    1717#define __POSIX_API_h
    18  
     18
    1919#include <rtems/config.h>
    2020
     
    2525 *  XXX
    2626 */
    27  
     27
    2828void _POSIX_API_Initialize(
    2929  rtems_configuration_table *configuration_table
  • cpukit/posix/include/rtems/posix/priority.h

    r1b4f2b30 r874297f3  
    2525
    2626#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (254)
    27  
     27
    2828#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
    2929
  • cpukit/posix/include/rtems/posix/psignal.h

    r1b4f2b30 r874297f3  
    7575);
    7676
    77 boolean _POSIX_signals_Unblock_thread( 
     77boolean _POSIX_signals_Unblock_thread(
    7878  Thread_Control  *the_thread,
    7979  int              signo,
  • cpukit/posix/include/rtems/posix/pthread.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __RTEMS_POSIX_THREADS_h
    1717#define __RTEMS_POSIX_THREADS_h
    18  
     18
    1919#ifdef __cplusplus
    2020extern "C" {
     
    3030 *  this class of objects.
    3131 */
    32  
     32
    3333POSIX_EXTERN Objects_Information  _POSIX_Threads_Information;
    3434
     
    3636 *  These are used to manage the user initialization threads.
    3737 */
    38  
    39 POSIX_EXTERN posix_initialization_threads_table 
     38
     39POSIX_EXTERN posix_initialization_threads_table
    4040                   *_POSIX_Threads_User_initialization_threads;
    4141POSIX_EXTERN uint32_t     _POSIX_Threads_Number_of_initialization_threads;
    4242
    4343extern const pthread_attr_t _POSIX_Threads_Default_attributes;
    44  
     44
    4545/*
    4646 *  _POSIX_Threads_Manager_initialization
     
    5050 *  This routine performs the initialization necessary for this manager.
    5151 */
    52  
     52
    5353void _POSIX_Threads_Manager_initialization(
    5454  uint32_t                            maximum_pthreads,
     
    5656  posix_initialization_threads_table *user_threads
    5757);
    58  
     58
    5959/*
    6060 *  _POSIX_Threads_Allocate
     
    6565 *  the inactive chain of free pthread control blocks.
    6666 */
    67  
     67
    6868RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void );
    69  
     69
    7070/*
    7171 *  _POSIX_Threads_Free
     
    7676 *  inactive chain of free pthread control blocks.
    7777 */
    78  
     78
    7979RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
    8080  Thread_Control *the_pthread
    8181);
    82  
     82
    8383/*
    8484 *  _POSIX_Threads_Get
     
    9494 *  to OBJECTS_ERROR and the_pthread is undefined.
    9595 */
    96  
     96
    9797RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
    9898  pthread_t          id,
    9999  Objects_Locations *location
    100100);
    101  
     101
    102102/*
    103103 *  _POSIX_Threads_Is_null
     
    107107 *  This function returns TRUE if the_pthread is NULL and FALSE otherwise.
    108108 */
    109  
     109
    110110RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
    111111  Thread_Control *the_pthread
     
    145145}
    146146#endif
    147  
     147
    148148#endif
    149149/*  end of include file */
  • cpukit/posix/include/rtems/posix/semaphore.h

    r1b4f2b30 r874297f3  
    1313 *  $Id$
    1414 */
    15  
     15
    1616#ifndef __RTEMS_POSIX_SEMAPHORE_h
    1717#define __RTEMS_POSIX_SEMAPHORE_h
    18  
     18
    1919#ifdef __cplusplus
    2020extern "C" {
     
    2929 *  Data Structure used to manage a POSIX semaphore
    3030 */
    31  
     31
    3232typedef struct {
    3333   Objects_Control         Object;
     
    4343 *  this class of objects.
    4444 */
    45  
     45
    4646POSIX_EXTERN Objects_Information  _POSIX_Semaphore_Information;
    47  
     47
    4848/*
    4949 *  _POSIX_Semaphore_Manager_initialization
     
    5353 *  This routine performs the initialization necessary for this manager.
    5454 */
    55  
     55
    5656void _POSIX_Semaphore_Manager_initialization(
    5757  uint32_t   maximum_semaphorees
    5858);
    59  
     59
    6060/*
    6161 *  _POSIX_Semaphore_Allocate
     
    6666 *  the inactive chain of free semaphore control blocks.
    6767 */
    68  
     68
    6969RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void );
    70  
     70
    7171/*
    7272 *  _POSIX_Semaphore_Free
     
    7777 *  inactive chain of free semaphore control blocks.
    7878 */
    79  
     79
    8080RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
    8181  POSIX_Semaphore_Control *the_semaphore
    8282);
    83  
     83
    8484/*
    8585 *  _POSIX_Semaphore_Get
     
    9595 *  to OBJECTS_ERROR and the_semaphore is undefined.
    9696 */
    97  
     97
    9898RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
    9999  sem_t        *id,
    100100  Objects_Locations *location
    101101);
    102  
     102
    103103/*
    104104 *  _POSIX_Semaphore_Is_null
     
    108108 *  This function returns TRUE if the_semaphore is NULL and FALSE otherwise.
    109109 */
    110  
     110
    111111RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null (
    112112  POSIX_Semaphore_Control *the_semaphore
     
    176176}
    177177#endif
    178  
     178
    179179#endif
    180180/*  end of include file */
  • cpukit/posix/include/rtems/posix/threadsup.h

    r1b4f2b30 r874297f3  
    2525#if 0
    2626  /*
    27    *  POSIX Interrupts 
     27   *  POSIX Interrupts
    2828   */
    2929  uint32_t                interrupts_installed;
     
    3232
    3333  /*
    34    *  POSIX Cancelability 
     34   *  POSIX Cancelability
    3535   */
    3636  int                     cancelability_state;
  • cpukit/posix/include/rtems/posix/time.h

    r1b4f2b30 r874297f3  
    1414 *  differences between POSIX API and RTEMS core.
    1515 */
    16  
     16
    1717#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \
    1818  (((1987 - 1970 + 1)  * TOD_SECONDS_PER_NON_LEAP_YEAR) + \
     
    2323 *  _POSIX_Timespec_subtract
    2424 */
    25  
     25
    2626void _POSIX_Timespec_subtract(
    2727  const struct timespec *the_start,
     
    4242 *  _POSIX_Interval_to_timespec
    4343 */
    44  
     44
    4545void _POSIX_Interval_to_timespec(
    4646  Watchdog_Interval  ticks,
  • cpukit/posix/include/sched.h

    r1b4f2b30 r874297f3  
    4141
    4242/*
    43  *  13.3.3 Set Scheduling Policy and Scheduling Parameters, 
     43 *  13.3.3 Set Scheduling Policy and Scheduling Parameters,
    4444 *         P1003.1b-1993, p. 254
    4545 */
  • cpukit/posix/src/adasupp.c

    r1b4f2b30 r874297f3  
    66#include "config.h"
    77#endif
    8  
     8
    99#include <assert.h>
    1010#include <errno.h>
     
    2222 */
    2323
    24 size_t _ada_pthread_minimum_stack_size( void ) 
     24size_t _ada_pthread_minimum_stack_size( void )
    2525{
    2626  /*
    2727   *  Eventually this may need to include a per cpu family calculation
    2828   *  but for now, this will do.
    29    */ 
     29   */
    3030
    3131  return PTHREAD_MINIMUM_STACK_SIZE * 2;
  • cpukit/posix/src/adjtime.c

    r1b4f2b30 r874297f3  
    33 *
    44 *  I am unaware of the history behind the definition of this service
    5  *  and don't know if its behavior is covered by any standard. --joel 
    6  * 
     5 *  and don't know if its behavior is covered by any standard. --joel
     6 *
    77 *  $Id$
    88 */
     
    2222
    2323int  adjtime ( struct timeval *delta, struct timeval *olddelta )
    24 { 
     24{
    2525  struct timespec ts;
    2626
     
    2929    olddelta->tv_usec = __adjustment / TOD_MICROSECONDS_PER_SECOND;
    3030  }
    31  
     31
    3232  if ( !delta )
    3333    return -1;
     
    3737  if ( __adjustment < _TOD_Microseconds_per_tick )
    3838    return 0;
    39    
     39
    4040  clock_gettime( CLOCK_REALTIME, &ts );
    4141
    4242  ts.tv_sec  += (__adjustment / TOD_MICROSECONDS_PER_SECOND);
    43   ts.tv_nsec += (__adjustment % TOD_MICROSECONDS_PER_SECOND) * 
     43  ts.tv_nsec += (__adjustment % TOD_MICROSECONDS_PER_SECOND) *
    4444                       TOD_NANOSECONDS_PER_MICROSECOND;
    4545
  • cpukit/posix/src/aio.c

    r1b4f2b30 r874297f3  
    6767/*PAGE
    6868 *
    69  *  6.7.6 Retrieve Return Status of Asynchronous I/O Operation, 
     69 *  6.7.6 Retrieve Return Status of Asynchronous I/O Operation,
    7070 *        P1003.1b-1993, p. 162
    7171 */
  • cpukit/posix/src/alarm.c

    r1b4f2b30 r874297f3  
    2929 *  _POSIX_signals_Alarm_TSR
    3030 */
    31  
     31
    3232void _POSIX_signals_Alarm_TSR(
    3333  Objects_Id      id,
  • cpukit/posix/src/cancel.c

    r1b4f2b30 r874297f3  
    3636   */
    3737
    38   if ( _ISR_Is_in_progress() ) 
     38  if ( _ISR_Is_in_progress() )
    3939    return EPROTO;
    4040
     
    5050      thread_support->cancelation_requested = 1;
    5151
    52       if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 
     52      if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
    5353           thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS ) {
    5454        _POSIX_Threads_cancel_run( the_thread );
     
    5858      return 0;
    5959  }
    60  
     60
    6161  return POSIX_BOTTOM_REACHED();
    6262}
  • cpukit/posix/src/cancelrun.c

    r1b4f2b30 r874297f3  
    2525 */
    2626
    27 void _POSIX_Threads_cancel_run( 
     27void _POSIX_Threads_cancel_run(
    2828  Thread_Control *the_thread
    2929)
     
    3333  POSIX_API_Control                 *thread_support;
    3434  ISR_Level                          level;
    35  
     35
    3636  thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
    37  
     37
    3838  handler_stack = &thread_support->Cancellation_Handlers;
    39  
     39
    4040  thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
    4141
    4242  while ( !_Chain_Is_empty( handler_stack ) ) {
    4343    _ISR_Disable( level );
    44       handler = (POSIX_Cancel_Handler_control *) 
     44      handler = (POSIX_Cancel_Handler_control *)
    4545           _Chain_Tail( handler_stack )->previous;
    4646      _Chain_Extract_unprotected( &handler->Node );
    4747    _ISR_Enable( level );
    48  
     48
    4949    (*handler->routine)( handler->arg );
    5050
  • cpukit/posix/src/cleanuppop.c

    r1b4f2b30 r874297f3  
    3333  POSIX_API_Control                 *thread_support;
    3434  ISR_Level                          level;
    35  
     35
    3636  thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
    37  
     37
    3838  handler_stack = &thread_support->Cancellation_Handlers;
    3939
     
    4343      return;
    4444    }
    45  
    46     handler = (POSIX_Cancel_Handler_control *) 
     45
     46    handler = (POSIX_Cancel_Handler_control *)
    4747        _Chain_Tail( handler_stack )->previous;
    4848    _Chain_Extract_unprotected( &handler->Node );
    49    
     49
    5050  _ISR_Enable( level );
    5151
  • cpukit/posix/src/cleanuppush.c

    r1b4f2b30 r874297f3  
    3232  Chain_Control                     *handler_stack;
    3333  POSIX_API_Control                 *thread_support;
    34  
     34
    3535  if ( !routine )
    36     return;          /* XXX what to do really? */ 
     36    return;          /* XXX what to do really? */
    3737
    3838  _Thread_Disable_dispatch();
     
    4141  if ( !handler ) {
    4242    _Thread_Enable_dispatch();
    43     return;          /* XXX what to do really? */ 
     43    return;          /* XXX what to do really? */
    4444  }
    4545
  • cpukit/posix/src/clockgetres.c

    r1b4f2b30 r874297f3  
    3131  if ( !res )
    3232    rtems_set_errno_and_return_minus_one( EINVAL );
    33  
     33
    3434  switch ( clock_id ) {
    35  
     35
    3636    /*
    3737     *  All time in rtems is based on the same clock tick.
     
    4747      }
    4848      break;
    49  
     49
    5050    default:
    5151      rtems_set_errno_and_return_minus_one( EINVAL );
    52  
     52
    5353  }
    5454  return 0;
  • cpukit/posix/src/clockgettime.c

    r1b4f2b30 r874297f3  
    3939
    4040    case CLOCK_REALTIME:
    41  
     41
    4242      _ISR_Disable( level );
    4343        seconds = _TOD_Seconds_since_epoch;
    4444        ticks   = _TOD_Current.ticks;
    4545      _ISR_Enable( level );
    46  
     46
    4747      tp->tv_sec  = seconds + POSIX_TIME_SECONDS_1970_THROUGH_1988;
    48       tp->tv_nsec = ticks * _TOD_Microseconds_per_tick * 
    49                       TOD_NANOSECONDS_PER_MICROSECOND; 
     48      tp->tv_nsec = ticks * _TOD_Microseconds_per_tick *
     49                      TOD_NANOSECONDS_PER_MICROSECOND;
    5050      break;
    5151
  • cpukit/posix/src/clocksettime.c

    r1b4f2b30 r874297f3  
    3636
    3737  switch ( clock_id ) {
    38  
     38
    3939    case CLOCK_REALTIME:
    4040      (void) gmtime_r( &tp->tv_sec, &split_time );
    41  
     41
    4242      /*
    4343       *  Convert the tm structure format to that used by the TOD Handler
     
    5858      if ( !_TOD_Validate( &tod ) )
    5959        rtems_set_errno_and_return_minus_one( EINVAL );
    60  
     60
    6161      /*
    62        *  We can't use the tp->tv_sec field because it is based on 
     62       *  We can't use the tp->tv_sec field because it is based on
    6363       *  a different EPOCH.
    6464       */
     
    6969      _Thread_Enable_dispatch();
    7070      break;
    71  
     71
    7272#ifdef _POSIX_CPUTIME
    7373    case CLOCK_PROCESS_CPUTIME:
     
    7575      break;
    7676#endif
    77  
     77
    7878#ifdef _POSIX_THREAD_CPUTIME
    7979    case CLOCK_THREAD_CPUTIME:
     
    8383    default:
    8484      rtems_set_errno_and_return_minus_one( EINVAL );
    85  
     85
    8686  }
    8787  return 0;
  • cpukit/posix/src/cond.c

    r1b4f2b30 r874297f3  
    2222 *  _POSIX_Condition_variables_Manager_initialization
    2323 *
    24  *  This routine initializes all condition variable manager related data 
     24 *  This routine initializes all condition variable manager related data
    2525 *  structures.
    2626 *
     
    3030 *  Output parameters:  NONE
    3131 */
    32  
     32
    3333void _POSIX_Condition_variables_Manager_initialization(
    3434  uint32_t   maximum_condition_variables
     
    4949    NULL                        /* Proxy extraction support callout */
    5050#endif
    51   ); 
     51  );
    5252}
  • cpukit/posix/src/condattrdestroy.c

    r1b4f2b30 r874297f3  
    2020/*PAGE
    2121 *
    22  *  11.4.1 Condition Variable Initialization Attributes, 
     22 *  11.4.1 Condition Variable Initialization Attributes,
    2323 *            P1003.1c/Draft 10, p. 96
    2424 */
    25  
     25
    2626int pthread_condattr_destroy(
    2727  pthread_condattr_t *attr
  • cpukit/posix/src/condattrgetpshared.c

    r1b4f2b30 r874297f3  
    2020/*PAGE
    2121 *
    22  *  11.4.1 Condition Variable Initialization Attributes, 
     22 *  11.4.1 Condition Variable Initialization Attributes,
    2323 *            P1003.1c/Draft 10, p. 96
    2424 */
    25  
     25
    2626int pthread_condattr_getpshared(
    2727  const pthread_condattr_t *attr,
  • cpukit/posix/src/condattrinit.c

    r1b4f2b30 r874297f3  
    2020/*PAGE
    2121 *
    22  *  11.4.1 Condition Variable Initialization Attributes, 
     22 *  11.4.1 Condition Variable Initialization Attributes,
    2323 *            P1003.1c/Draft 10, p. 96
    2424 */
    25  
     25
    2626int pthread_condattr_init(
    2727  pthread_condattr_t *attr
  • cpukit/posix/src/condattrsetpshared.c

    r1b4f2b30 r874297f3  
    2020/*PAGE
    2121 *
    22  *  11.4.1 Condition Variable Initialization Attributes, 
     22 *  11.4.1 Condition Variable Initialization Attributes,
    2323 *            P1003.1c/Draft 10, p. 96
    2424 */
    25  
     25
    2626int pthread_condattr_setpshared(
    2727  pthread_condattr_t *attr,
  • cpukit/posix/src/condbroadcast.c

    r1b4f2b30 r874297f3  
    2222 *  11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
    2323 */
    24  
     24
    2525int pthread_cond_broadcast(
    2626  pthread_cond_t   *cond
  • cpukit/posix/src/conddefaultattributes.c

    r1b4f2b30 r874297f3  
    2222 *  The default condition variable attributes structure.
    2323 */
    24  
     24
    2525const pthread_condattr_t _POSIX_Condition_variables_Default_attributes = {
    2626  TRUE,                      /* is_initialized */
  • cpukit/posix/src/conddestroy.c

    r1b4f2b30 r874297f3  
    2020/*PAGE
    2121 *
    22  *  11.4.2 Initializing and Destroying a Condition Variable, 
     22 *  11.4.2 Initializing and Destroying a Condition Variable,
    2323 *         P1003.1c/Draft 10, p. 87
    2424 */
    25  
     25
    2626int pthread_cond_destroy(
    2727  pthread_cond_t           *cond
     
    3030  register POSIX_Condition_variables_Control *the_cond;
    3131  Objects_Locations                           location;
    32  
     32
    3333  the_cond = _POSIX_Condition_variables_Get( cond, &location );
    3434  switch ( location ) {
     
    4545
    4646    case OBJECTS_LOCAL:
    47  
     47
    4848      if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
    4949        _Thread_Enable_dispatch();
    5050        return EBUSY;
    5151      }
    52  
     52
    5353      _Objects_Close(
    5454        &_POSIX_Condition_variables_Information,
    5555        &the_cond->Object
    5656      );
    57  
     57
    5858      _POSIX_Condition_variables_Free( the_cond );
    59  
     59
    6060#if defined(RTEMS_MULTIPROCESSING)
    6161      if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
    62  
     62
    6363        _Objects_MP_Close(
    6464          &_POSIX_Condition_variables_Information,
    6565          the_cond->Object.id
    6666        );
    67  
     67
    6868        _POSIX_Condition_variables_MP_Send_process_packet(
    6969          POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE,
  • cpukit/posix/src/condinit.c

    r1b4f2b30 r874297f3  
    2020/*PAGE
    2121 *
    22  *  11.4.2 Initializing and Destroying a Condition Variable, 
     22 *  11.4.2 Initializing and Destroying a Condition Variable,
    2323 *         P1003.1c/Draft 10, p. 87
    2424 */
    25  
     25
    2626int pthread_cond_init(
    2727  pthread_cond_t           *cond,
     
    3131  POSIX_Condition_variables_Control   *the_cond;
    3232  const pthread_condattr_t            *the_attr;
    33  
     33
    3434  if ( attr ) the_attr = attr;
    3535  else        the_attr = &_POSIX_Condition_variables_Default_attributes;
    36  
     36
    3737  /*
    3838   *  XXX: Be careful about attributes when global!!!
    3939   */
    40  
     40
    4141  if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
    4242    return POSIX_MP_NOT_IMPLEMENTED();
    43  
     43
    4444  if ( !the_attr->is_initialized )
    4545    return EINVAL;
    46  
     46
    4747  _Thread_Disable_dispatch();
    48  
     48
    4949  the_cond = _POSIX_Condition_variables_Allocate();
    50  
     50
    5151  if ( !the_cond ) {
    5252    _Thread_Enable_dispatch();
    5353    return ENOMEM;
    5454  }
    55  
     55
    5656#if defined(RTEMS_MULTIPROCESSING)
    5757  if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
     
    6363  }
    6464#endif
    65  
     65
    6666  the_cond->process_shared  = the_attr->process_shared;
    6767
     
    8181    0
    8282  );
    83  
     83
    8484  *cond = the_cond->Object.id;
    85  
     85
    8686#if defined(RTEMS_MULTIPROCESSING)
    8787  if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
     
    9393    );
    9494#endif
    95  
     95
    9696  _Thread_Enable_dispatch();
    9797
  • cpukit/posix/src/condsignal.c

    r1b4f2b30 r874297f3  
    2222 *  11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
    2323 */
    24  
     24
    2525int pthread_cond_signal(
    2626  pthread_cond_t   *cond
  • cpukit/posix/src/condsignalsupp.c

    r1b4f2b30 r874297f3  
    2525 *  wake up version of the "signal" operation.
    2626 */
    27  
     27
    2828int _POSIX_Condition_variables_Signal_support(
    2929  pthread_cond_t            *cond,
     
    3434  Objects_Locations                           location;
    3535  Thread_Control                             *the_thread;
    36  
     36
    3737  the_cond = _POSIX_Condition_variables_Get( cond, &location );
    3838  switch ( location ) {
     
    4747      return EINVAL;
    4848    case OBJECTS_LOCAL:
    49  
    50       do { 
     49
     50      do {
    5151        the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
    5252        if ( !the_thread )
  • cpukit/posix/src/condtimedwait.c

    r1b4f2b30 r874297f3  
    2222 *  11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
    2323 */
    24  
     24
    2525int pthread_cond_timedwait(
    2626  pthread_cond_t        *cond,
     
    4949  if ( ( difference.tv_sec < 0 ) || ( ( difference.tv_sec == 0 ) &&
    5050       ( difference.tv_nsec < 0 ) ) )
    51     already_timedout = TRUE;   
     51    already_timedout = TRUE;
    5252
    5353  timeout = _POSIX_Timespec_to_interval( &difference );
  • cpukit/posix/src/condwait.c

    r1b4f2b30 r874297f3  
    2222 *  11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
    2323 */
    24  
     24
    2525int pthread_cond_wait(
    2626  pthread_cond_t     *cond,
  • cpukit/posix/src/condwaitsupp.c

    r1b4f2b30 r874297f3  
    2525 *  timed wait version of condition variable wait routines.
    2626 */
    27  
     27
    2828int _POSIX_Condition_variables_Wait_support(
    2929  pthread_cond_t            *cond,
     
    3737  int                                         status;
    3838  int                                         mutex_status;
    39  
     39
    4040  if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
    4141     return EINVAL;
     
    5555      return EINVAL;
    5656    case OBJECTS_LOCAL:
    57  
     57
    5858      if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
    5959        _Thread_Enable_dispatch();
    6060        return EINVAL;
    6161      }
    62  
     62
    6363      (void) pthread_mutex_unlock( mutex );
    6464/* XXX ignore this for now  since behavior is undefined
     
    7171      if ( !already_timedout ) {
    7272        the_cond->Mutex = *mutex;
    73  
     73
    7474        _Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
    7575        _Thread_Executing->Wait.return_code = 0;
     
    8282
    8383        /*
    84          *  Switch ourself out because we blocked as a result of the 
     84         *  Switch ourself out because we blocked as a result of the
    8585         *  _Thread_queue_Enqueue.
    8686         */
     
    102102      if ( mutex_status )
    103103        return EINVAL;
    104    
     104
    105105      return status;
    106106  }
  • cpukit/posix/src/execl.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  execl() - POSIX 1003.1b 3.1.2
    33 *
  • cpukit/posix/src/execle.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  execle() - POSIX 1003.1b 3.1.2
    33 *
  • cpukit/posix/src/execlp.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  execlp() - POSIX 1003.1b 3.1.2
    33 *
  • cpukit/posix/src/execv.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  execv() - POSIX 1003.1b 3.1.2
    33 *
  • cpukit/posix/src/execve.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  execve() - POSIX 1003.1b 3.1.2
    33 *
  • cpukit/posix/src/execvp.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  execvp() - POSIX 1003.1b 3.1.2
    33 *
  • cpukit/posix/src/fork.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  fork() - POSIX 1003.1b 3.1.1
    33 *
  • cpukit/posix/src/intr.c

    r1b4f2b30 r874297f3  
    11/*
    22 *  NOTE: Each task has an interrupt semaphore associated with it.
    3  *        No matter which interrupt occurs that it has registered, 
     3 *        No matter which interrupt occurs that it has registered,
    44 *        the same semaphore is used.
    55 *
     
    3333 *  This routine performs the initialization necessary for this manager.
    3434 */
    35  
    36 void _POSIX_Interrupt_Manager_initialization( 
     35
     36void _POSIX_Interrupt_Manager_initialization(
    3737  uint32_t    maximum_interrupt_handlers
    3838)
     
    5959  for ( index=0 ; index < CPU_INTERRUPT_NUMBER_OF_VECTORS ; index++ ) {
    6060    the_vector = &_POSIX_Interrupt_Information[ index ];
    61    
     61
    6262    the_vector->number_installed = 0;
    6363    the_vector->lock_count       = 0;
     
    8484  proc_ptr                           old_handler;
    8585
    86   if ( !_ISR_Is_vector_number_valid( intr ) || 
     86  if ( !_ISR_Is_vector_number_valid( intr ) ||
    8787       !_ISR_Is_valid_user_handler( intr_handler ) )
    8888    return EINVAL;
     
    9191
    9292  the_intr = _POSIX_Interrupt_Allocate();
    93  
     93
    9494  if ( !the_intr ) {
    9595    _Thread_Enable_dispatch();
     
    124124    _ISR_Install_vector(
    125125      intr,
    126       (proc_ptr) _POSIX_Interrupt_Handler, 
     126      (proc_ptr) _POSIX_Interrupt_Handler,
    127127      &old_handler
    128128    );
    129129
    130130  _Objects_Open( &_POSIX_Interrupt_Handlers_Information, &the_intr->Object, 0 );
    131  
     131
    132132  /*
    133133   *  Normally, an Id would be returned here.
    134134   */
    135  
    136   _Thread_Enable_dispatch();
    137  
     135
     136  _Thread_Enable_dispatch();
     137
    138138  return 0;
    139139}
     
    191191    return EINVAL;  /* XXX should be ENOISR; */
    192192  }
    193    
     193
    194194  /*
    195195   *  OK now we have found the interrupt handler and can do some work.
     
    199199
    200200  the_intr->is_active = FALSE;
    201  
     201
    202202  the_vector->number_installed -= 1;
    203203
     
    214214
    215215  _POSIX_Interrupt_Free( the_intr );
    216  
     216
    217217  _Thread_Enable_dispatch();
    218218
     
    241241  return 0;
    242242}
    243  
     243
    244244/*PAGE
    245245 *
     
    252252{
    253253  POSIX_Interrupt_Control           *the_vector;
    254  
    255   _Thread_Disable_dispatch();
    256  
     254
     255  _Thread_Disable_dispatch();
     256
    257257  the_vector = &_POSIX_Interrupt_Information[ intr ];
    258  
     258
    259259  if ( !--the_vector->lock_count ) {
    260260    while ( --the_vector->deferred_count ) {
     
    262262    }
    263263  }
    264  
    265   _Thread_Enable_dispatch();
    266  
     264
     265  _Thread_Enable_dispatch();
     266
    267267  return 0;
    268268}
    269  
     269
    270270/*
    271271 *  22.3.2 Await Interrupt Notification, P1003.4b/D8, p. 76
     
    291291      TRUE,
    292292      ticks
    293     ); 
     293    );
    294294  _Thread_Enable_dispatch();
    295295
     
    299299/*PAGE
    300300 *
    301  *  _POSIX_Interrupt_Handler 
     301 *  _POSIX_Interrupt_Handler
    302302 *
    303303 */
     
    312312  Chain_Node                        *the_node;
    313313  int                                status;
    314  
     314
    315315  the_vector = &_POSIX_Interrupt_Information[ vector ];
    316  
     316
    317317  the_node = _Chain_Head( &the_vector->Handlers );
    318  
     318
    319319  for ( ; !_Chain_Is_tail( &the_vector->Handlers, the_node ) ; ) {
    320320    the_intr = (POSIX_Interrupt_Handler_control *) the_node;
    321  
     321
    322322    status = (*the_intr->handler)( (void *) the_intr->user_data_area );
    323323
  • cpukit/posix/src/key.c

    r1b4f2b30 r874297f3  
    2424 *  This routine performs the initialization necessary for this manager.
    2525 */
    26  
     26
    2727void _POSIX_Key_Manager_initialization(
    2828  uint32_t   maximum_keys
  • cpukit/posix/src/keycreate.c

    r1b4f2b30 r874297f3  
    3434
    3535  _Thread_Disable_dispatch();
    36  
     36
    3737  the_key = _POSIX_Keys_Allocate();
    38  
     38
    3939  if ( !the_key ) {
    4040    _Thread_Enable_dispatch();
     
    5656    if ( _Objects_Information_table[ the_api ] &&
    5757         _Objects_Information_table[ the_api ][ 1 ] ) {
    58       bytes_to_allocate = sizeof( void * ) * 
     58      bytes_to_allocate = sizeof( void * ) *
    5959        (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
    6060      table = _Workspace_Allocate( bytes_to_allocate );
     
    6464              the_api-- )
    6565          _Workspace_Free( the_key->Values[ the_api ] );
    66  
     66
    6767        _POSIX_Keys_Free( the_key );
    6868        _Thread_Enable_dispatch();
     
    7171
    7272      the_key->Values[ the_api ] = table;
    73       memset( table, '\0', bytes_to_allocate ); 
     73      memset( table, '\0', bytes_to_allocate );
    7474    } else {
    7575      the_key->Values[ the_api ] = NULL;
     
    8282
    8383  _Objects_Open( &_POSIX_Keys_Information, &the_key->Object, 0 );
    84  
     84
    8585  *key = the_key->Object.id;
    8686
  • cpukit/posix/src/keydelete.c

    r1b4f2b30 r874297f3  
    2929  Objects_Locations            location;
    3030  uint32_t                     the_api;
    31  
     31
    3232  the_key = _POSIX_Keys_Get( key, &location );
    3333  switch ( location ) {
  • cpukit/posix/src/keygetspecific.c

    r1b4f2b30 r874297f3  
    3131  Objects_Locations            location;
    3232  void                        *key_data;
    33  
     33
    3434  the_key = _POSIX_Keys_Get( key, &location );
    3535  switch ( location ) {
  • cpukit/posix/src/keyrundestructors.c

    r1b4f2b30 r874297f3  
    5050    for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
    5151
    52       the_key = (POSIX_Keys_Control *) 
     52      the_key = (POSIX_Keys_Control *)
    5353        _POSIX_Keys_Information.local_table[ index ];
    54      
     54
    5555      if ( the_key && the_key->is_active && the_key->destructor ) {
    5656        value = the_key->Values[ pthread_class ][ pthread_index ];
     
    6363    }
    6464
    65     if ( are_all_null == TRUE ) 
     65    if ( are_all_null == TRUE )
    6666      return;
    6767
     
    7676
    7777    if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS )
    78       return; 
     78      return;
    7979  }
    8080}
  • cpukit/posix/src/keysetspecific.c

    r1b4f2b30 r874297f3  
    3131  uint32_t                     class;
    3232  Objects_Locations            location;
    33  
     33
    3434  the_key = _POSIX_Keys_Get( key, &location );
    3535  switch ( location ) {
  • cpukit/posix/src/killinfo.c

    r1b4f2b30 r874297f3  
    3636#define _POSIX_signals_Is_interested( _api, _mask ) \
    3737  ( ~(_api)->signals_blocked & (_mask) )
    38          
     38
    3939int killinfo(
    4040  pid_t               pid,
     
    5858  siginfo_t                   *siginfo;
    5959  POSIX_signals_Siginfo_node  *psiginfo;
    60  
     60
    6161  /*
    6262   *  Only supported for the "calling process" (i.e. this node).
    6363   */
    64  
     64
    6565  if ( pid != getpid() )
    6666    rtems_set_errno_and_return_minus_one( ESRCH );
     
    6969   *  Validate the signal passed if not 0.
    7070   */
    71  
     71
    7272  if ( sig && !is_valid_signo(sig) ) {
    7373    rtems_set_errno_and_return_minus_one( EINVAL );
     
    8383
    8484  /*
    85    *  P1003.1c/Draft 10, p. 33 says that certain signals should always 
     85   *  P1003.1c/Draft 10, p. 33 says that certain signals should always
    8686   *  be directed to the executing thread such as those caused by hardware
    8787   *  faults.
     
    137137
    138138    the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
    139  
     139
    140140    for ( the_node = the_chain->first ;
    141141          !_Chain_Is_tail( the_chain, the_node ) ;
     
    237237      /*
    238238       *  Now the interested thread is blocked.
    239        *  If the thread we are considering is not, the it becomes the 
     239       *  If the thread we are considering is not, the it becomes the
    240240       *  interested thread.
    241241       */
     
    257257
    258258      /*
    259        *  Now both threads are blocked and the interested thread is not 
     259       *  Now both threads are blocked and the interested thread is not
    260260       *  interruptible.
    261261       *  If the thread under consideration is interruptible by a signal,
     
    284284   *    + pthread_sigmask() unblocks the signal,
    285285   *    + sigprocmask() unblocks the signal, OR
    286    *    + sigaction() which changes the handler to SIG_IGN. 
     286   *    + sigaction() which changes the handler to SIG_IGN.
    287287   */
    288288
     
    291291
    292292  /*
    293    *  We found a thread which was interested, so now we mark that this 
    294    *  thread needs to do the post context switch extension so it can 
     293   *  We found a thread which was interested, so now we mark that this
     294   *  thread needs to do the post context switch extension so it can
    295295   *  evaluate the signals pending.
    296296   */
    297297
    298298process_it:
    299  
     299
    300300  the_thread->do_post_task_switch_extension = TRUE;
    301301
  • cpukit/posix/src/mqueue.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4545 *  Output parameters:  NONE
    4646 */
    47  
     47
    4848void _POSIX_Message_queue_Manager_initialization(
    4949  uint32_t   maximum_message_queues
  • cpukit/posix/src/mqueueclose.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4545  POSIX_Message_queue_Control_fd *the_mq_fd;
    4646  Objects_Locations               location;
    47  
     47
    4848  the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
    4949  switch ( location ) {
  • cpukit/posix/src/mqueuecreatesupp.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4444 *
    4545 *  This routine does the actual creation and initialization of
    46  *  a poxix message queue. 
     46 *  a poxix message queue.
    4747 */
    48  
     48
    4949int _POSIX_Message_queue_Create_support(
    5050  const char                    *name_arg,
     
    6161
    6262  n = strnlen( name_arg, NAME_MAX );
    63   if ( n > NAME_MAX ) 
     63  if ( n > NAME_MAX )
    6464    return ENAMETOOLONG;
    6565
    6666  _Thread_Disable_dispatch();
    67  
     67
    6868  /*
    6969   *  There is no real basis for the default values.  They will work
     
    9999  }
    100100#endif
    101  
     101
    102102  the_mq = _POSIX_Message_queue_Allocate();
    103103  if ( !the_mq ) {
     
    105105    rtems_set_errno_and_return_minus_one( ENFILE );
    106106  }
    107  
     107
    108108  the_mq->process_shared  = pshared;
    109109  the_mq->named = TRUE;
     
    123123  }
    124124  strcpy( name, name_arg );
    125  
     125
    126126  /* XXX
    127127   *
     
    144144      _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq->Object.id );
    145145#endif
    146  
     146
    147147    _POSIX_Message_queue_Free( the_mq );
    148148    _Workspace_Free(name);
     
    156156    (char *) name
    157157  );
    158  
     158
    159159  *message_queue = the_mq;
    160  
     160
    161161#if 0 && defined(RTEMS_MULTIPROCESSING)
    162162  if ( pshared == PTHREAD_PROCESS_SHARED )
     
    168168    );
    169169#endif
    170  
     170
    171171  _Thread_Enable_dispatch();
    172172  return 0;
  • cpukit/posix/src/mqueuedeletesupp.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    3838 *  _POSIX_Message_queue_Delete
    3939 */
    40  
     40
    4141void _POSIX_Message_queue_Delete(
    4242  POSIX_Message_queue_Control *the_mq
     
    4949
    5050      _Objects_Close( &_POSIX_Message_queue_Information, &the_mq->Object );
    51  
     51
    5252      _CORE_message_queue_Close(
    5353        &the_mq->Message_queue,
     
    5757
    5858    _POSIX_Message_queue_Free( the_mq );
    59  
     59
    6060#if 0 && defined(RTEMS_MULTIPROCESSING)
    6161    if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) {
    62  
     62
    6363      _Objects_MP_Close(
    6464        &_POSIX_Message_queue_Information,
    6565        the_mq->Object.id
    6666      );
    67  
     67
    6868      _POSIX_Message_queue_MP_Send_process_packet(
    6969        POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE,
     
    7474    }
    7575#endif
    76  
     76
    7777  }
    7878}
  • cpukit/posix/src/mqueuegetattr.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4747  Objects_Locations                     location;
    4848  CORE_message_queue_Attributes        *the_mq_attr;
    49  
     49
    5050  if ( !mqstat )
    5151    rtems_set_errno_and_return_minus_one( EINVAL );
     
    6565       *  Return the old values.
    6666       */
    67  
     67
    6868      the_mq_attr = &the_mq->Message_queue.Attributes;
    69  
     69
    7070      mqstat->mq_flags   = the_mq_fd->oflag;
    7171      mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
    7272      mqstat->mq_maxmsg  = the_mq->Message_queue.maximum_pending_messages;
    7373      mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
    74  
     74
    7575      _Thread_Enable_dispatch();
    7676      return 0;
  • cpukit/posix/src/mqueuenametoid.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    5757    return ENAMETOOLONG;
    5858
    59   status = _Objects_Name_to_id( 
     59  status = _Objects_Name_to_id(
    6060    &_POSIX_Message_queue_Information, (char *)name, 0, id );
    6161
  • cpukit/posix/src/mqueuenotify.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    5656/*PAGE
    5757 *
    58  *  15.2.6 Notify Process that a Message is Available on a Queue, 
     58 *  15.2.6 Notify Process that a Message is Available on a Queue,
    5959 *         P1003.1b-1993, p. 280
    6060 */
     
    6868  POSIX_Message_queue_Control_fd *the_mq_fd;
    6969  Objects_Locations               location;
    70  
     70
    7171  the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
    7272  switch ( location ) {
     
    8989
    9090        the_mq->notification = *notification;
    91      
     91
    9292        _CORE_message_queue_Set_notify(
    9393          &the_mq->Message_queue,
  • cpukit/posix/src/mqueueopen.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    5454  POSIX_Message_queue_Control_fd *the_mq_fd;
    5555  Objects_Locations               location;
    56  
     56
    5757  _Thread_Disable_dispatch();
    5858
     
    6363    va_end(arg);
    6464  }
    65  
     65
    6666  the_mq_fd = _POSIX_Message_queue_Allocate_fd();
    6767  if ( !the_mq_fd ) {
     
    7979   *  or some other miscellaneous error on the name.
    8080   */
    81  
     81
    8282  if ( status ) {
    83  
     83
    8484    /*
    8585     * Unless provided a valid name that did not already exist
     
    9494
    9595  } else {                /* name -> ID translation succeeded */
    96  
     96
    9797    /*
    9898     * Check for existence with creation.
     
    121121    _Thread_Enable_dispatch();
    122122    return (mqd_t)the_mq_fd->Object.id;
    123  
     123
    124124  }
    125  
    126   /* 
     125
     126  /*
    127127   *  At this point, the message queue does not exist and everything has been
    128128   *  checked. We should go ahead and create a message queue.
    129129   */
    130  
     130
    131131  status = _POSIX_Message_queue_Create_support(
    132132    name,
     
    135135    &the_mq
    136136  );
    137  
     137
    138138  /*
    139139   * errno was set by Create_support, so don't set it again.
     
    145145    return (mqd_t) -1;
    146146  }
    147  
     147
    148148  the_mq_fd->Queue = the_mq;
    149149  _Objects_Open(
     
    152152    NULL
    153153  );
    154  
     154
    155155  _Thread_Enable_dispatch();
    156156
  • cpukit/posix/src/mqueuereceive.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
  • cpukit/posix/src/mqueuerecvsupp.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4040 *        through the layers.
    4141 */
    42  
     42
    4343ssize_t _POSIX_Message_queue_Receive_support(
    4444  mqd_t               mqdes,
     
    5353  Objects_Locations                location;
    5454  uint32_t                         length_out;
    55  
     55
    5656  the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
    5757  switch ( location ) {
     
    7474        rtems_set_errno_and_return_minus_one( EMSGSIZE );
    7575      }
    76  
     76
    7777      /*
    7878       *  Now if something goes wrong, we return a "length" of -1
     
    9090        timeout
    9191      );
    92      
     92
    9393      _Thread_Enable_dispatch();
    9494      *msg_prio =
  • cpukit/posix/src/mqueuesend.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4444  const char   *msg_ptr,
    4545  size_t        msg_len,
    46   unsigned int  msg_prio 
     46  unsigned int  msg_prio
    4747)
    4848{
  • cpukit/posix/src/mqueuesendsupp.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    3838 *  _POSIX_Message_queue_Send_support
    3939 */
    40  
     40
    4141int _POSIX_Message_queue_Send_support(
    4242  mqd_t               mqdes,
     
    8989#endif
    9090        _POSIX_Message_queue_Priority_to_core( msg_prio ),
    91          (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE, 
     91         (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE,
    9292        timeout    /* no timeout */
    9393      );
     
    9898       *  If we had to block, then this is where the task returns
    9999       *  after it wakes up.  The returned status is correct for
    100        *  non-blocking operations but if we blocked, then we need 
     100       *  non-blocking operations but if we blocked, then we need
    101101       *  to look at the status in our TCB.
    102102       */
     
    110110      rtems_set_errno_and_return_minus_one(
    111111        _POSIX_Message_queue_Translate_core_message_queue_return_code(
    112           msg_status 
     112          msg_status
    113113        )
    114114      );
  • cpukit/posix/src/mqueuesetattr.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4747  CORE_message_queue_Control     *the_core_mq;
    4848  Objects_Locations               location;
    49  
     49
    5050  if ( !mqstat )
    5151    rtems_set_errno_and_return_minus_one( EINVAL );
     
    7373        omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
    7474      }
    75  
     75
    7676      the_mq_fd->oflag = mqstat->mq_flags;
    7777      _Thread_Enable_dispatch();
  • cpukit/posix/src/mqueuetimedreceive.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
  • cpukit/posix/src/mqueuetimedsend.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
  • cpukit/posix/src/mqueuetranslatereturncode.c

    r1b4f2b30 r874297f3  
    11/*
    2  *  POSIX Message Queue Error Translation 
     2 *  POSIX Message Queue Error Translation
    33 *
    44 *
     
    4242 *
    4343 */
    44  
     44
    4545int _POSIX_Message_queue_Translate_core_message_queue_return_code(
    4646  uint32_t   the_message_queue_status
     
    8282
    8383      /*
    84        *  POSIX Real-Time Extensions add timeouts to send and receive. 
     84       *  POSIX Real-Time Extensions add timeouts to send and receive.
    8585       */
    8686    case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
  • cpukit/posix/src/mqueueunlink.c

    r1b4f2b30 r874297f3  
    33 *         Message_queues to leave the option of having unnamed message
    44 *         queues at a future date.  They are currently not part of the
    5  *         POSIX standard but unnamed message_queues are.  This is also 
    6  *         the reason for the apparently unnecessary tracking of 
     5 *         POSIX standard but unnamed message_queues are.  This is also
     6 *         the reason for the apparently unnecessary tracking of
    77 *         the process_shared attribute.  [In addition to the fact that
    88 *         it would be trivial to add pshared to the mq_attr structure
     
    4646  register POSIX_Message_queue_Control *the_mq;
    4747  Objects_Id                            the_mq_id;
    48  
     48
    4949  _Thread_Disable_dispatch();
    5050
     
    6868    _Objects_Get_index( the_mq_id )
    6969  );
    70  
     70
    7171#if 0 && defined(RTEMS_MULTIPROCESSING)
    7272  if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) {
     
    7575#endif
    7676
    77  
     77
    7878  the_mq->linked = FALSE;
    7979  _Workspace_Free( the_mq->Object.name );
  • cpukit/posix/src/mutex.c

    r1b4f2b30 r874297f3  
    3232 *  Output parameters:  NONE
    3333 */
    34  
     34
    3535void _POSIX_Mutex_Manager_initialization(
    3636  uint32_t   maximum_mutexes
  • cpukit/posix/src/mutexattrgetprioceiling.c

    r1b4f2b30 r874297f3  
    2525 *  13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
    2626 */
    27  
     27
    2828int pthread_mutexattr_getprioceiling(
    2929  const pthread_mutexattr_t   *attr,
  • cpukit/posix/src/mutexattrgetprotocol.c

    r1b4f2b30 r874297f3  
    2525 *  13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
    2626 */
    27  
     27
    2828int pthread_mutexattr_getprotocol(
    2929  const pthread_mutexattr_t   *attr,
  • cpukit/posix/src/mutexattrsetprioceiling.c

    r1b4f2b30 r874297f3  
    2525 *  13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
    2626 */
    27  
     27
    2828int pthread_mutexattr_setprioceiling(
    2929  pthread_mutexattr_t   *attr,
  • cpukit/posix/src/mutexattrsetprotocol.c

    r1b4f2b30 r874297f3  
    2525 *  13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
    2626 */
    27  
     27
    2828int pthread_mutexattr_setprotocol(
    2929  pthread_mutexattr_t   *attr,
     
    4040      attr->protocol = protocol;
    4141      return 0;
    42  
     42
    4343    default:
    4444      return EINVAL;
  • cpukit/posix/src/mutexdefaultattributes.c

    r1b4f2b30 r874297f3  
    2222
    2323/*PAGE
    24  * 
     24 *
    2525 *  The default mutex attributes structure.
    2626 */
  • cpukit/posix/src/mutexdestroy.c

    r1b4f2b30 r874297f3  
    3232  register POSIX_Mutex_Control *the_mutex;
    3333  Objects_Locations             location;
    34  
     34
    3535  the_mutex = _POSIX_Mutex_Get( mutex, &location );
    3636  switch ( location ) {
     
    5353        return EBUSY;
    5454      }
    55  
     55
    5656      _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
    57  
     57
    5858      _CORE_mutex_Flush(
    5959        &the_mutex->Mutex,
     
    6565        EINVAL
    6666      );
    67  
     67
    6868      _POSIX_Mutex_Free( the_mutex );
    69  
     69
    7070#if defined(RTEMS_MULTIPROCESSING)
    7171      if ( the_mutex->process_shared == PTHREAD_PROCESS_SHARED ) {
    72  
     72
    7373        _Objects_MP_Close( &_POSIX_Mutex_Information, the_mutex->Object.id );
    74  
     74
    7575        _POSIX_Mutex_MP_Send_process_packet(
    7676          POSIX_MUTEX_MP_ANNOUNCE_DELETE,
  • cpukit/posix/src/mutexinit.c

    r1b4f2b30 r874297f3  
    5252
    5353  /*
    54    *  This code should eventually be removed. 
     54   *  This code should eventually be removed.
    5555   *
    5656   *  Although the POSIX specification says:
     
    7171   */
    7272
    73  
     73
    7474#if 0
    7575  /* avoid infinite recursion on call to this routine in _POSIX_Mutex_Get */
     
    9090  }
    9191#endif
    92  
    93   if ( !the_attr->is_initialized ) 
     92
     93  if ( !the_attr->is_initialized )
    9494    return EINVAL;
    9595
     
    104104    return POSIX_MP_NOT_IMPLEMENTED();
    105105#endif
    106  
     106
    107107  /*
    108108   *  Determine the discipline of the mutex
    109109   */
    110  
     110
    111111  switch ( the_attr->protocol ) {
    112112    case PTHREAD_PRIO_NONE:
     
    129129
    130130  the_mutex = _POSIX_Mutex_Allocate();
    131  
     131
    132132  if ( !the_mutex ) {
    133133    _Thread_Enable_dispatch();
     
    136136
    137137#if defined(RTEMS_MULTIPROCESSING)
    138   if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED && 
     138  if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
    139139       !( _Objects_MP_Allocate_and_open( &_POSIX_Mutex_Information, 0,
    140140                            the_mutex->Object.id, FALSE ) ) ) {
  • cpukit/posix/src/mutexlock.c

    r1b4f2b30 r874297f3  
    2424 *
    2525 *  11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
    26  *       
     26 *
    2727 *  NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
    2828 */
  • cpukit/posix/src/mutexlocksupp.c

    r1b4f2b30 r874297f3  
    3838  Objects_Locations             location;
    3939  ISR_Level                     level;
    40  
     40
    4141  the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level );
    4242  switch ( location ) {
  • cpukit/posix/src/mutexsetprioceiling.c

    r1b4f2b30 r874297f3  
    6969      _CORE_mutex_Surrender(
    7070        &the_mutex->Mutex,
    71         the_mutex->Object.id, 
     71        the_mutex->Object.id,
    7272#if defined(RTEMS_MULTIPROCESSING)
    7373        _POSIX_Threads_mutex_MP_support
  • cpukit/posix/src/mutextimedlock.c

    r1b4f2b30 r874297f3  
    2424 *
    2525 *  11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
    26  *       
     26 *
    2727 *  NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
    2828 */
     
    3333)
    3434{
    35   return _POSIX_Mutex_Lock_support( 
     35  return _POSIX_Mutex_Lock_support(
    3636    mutex,
    3737    TRUE,
  • cpukit/posix/src/mutextrylock.c

    r1b4f2b30 r874297f3  
    2424 *
    2525 *  11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
    26  *       
     26 *
    2727 *  NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
    2828 */
  • cpukit/posix/src/mutexunlock.c

    r1b4f2b30 r874297f3  
    2424 *
    2525 *  11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
    26  *       
     26 *
    2727 *  NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
    2828 */
     
    3535  Objects_Locations             location;
    3636  CORE_mutex_Status             status;
    37  
     37
    3838  the_mutex = _POSIX_Mutex_Get( mutex, &location );
    3939  switch ( location ) {
     
    5252      status = _CORE_mutex_Surrender(
    5353        &the_mutex->Mutex,
    54         the_mutex->Object.id, 
     54        the_mutex->Object.id,
    5555#if defined(RTEMS_MULTIPROCESSING)
    5656        _POSIX_Threads_mutex_MP_support
  • cpukit/posix/src/nanosleep.c

    r1b4f2b30 r874297f3  
    3838
    3939  /*
    40    *  Return EAGAIN if the delay interval is negative. 
     40   *  Return EAGAIN if the delay interval is negative.
    4141   *
    42    *  NOTE:  This behavior is beyond the POSIX specification. 
     42   *  NOTE:  This behavior is beyond the POSIX specification.
    4343   *         FSU pthreads shares this behavior.
    4444   */
     
    5252  if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
    5353    rtems_set_errno_and_return_minus_one( EINVAL );
    54  
     54
    5555  ticks = _POSIX_Timespec_to_interval( the_rqtp );
    5656
     
    6565    _Thread_Enable_dispatch();
    6666    if ( rmtp ) {
    67        rmtp->tv_sec = 0; 
    68        rmtp->tv_nsec = 0; 
     67       rmtp->tv_sec = 0;
     68       rmtp->tv_nsec = 0;
    6969    }
    7070    return 0;
    7171  }
    72  
     72
    7373  _Thread_Disable_dispatch();
    7474    _Thread_Set_state(
     
    8888
    8989  if ( rmtp ) {
    90     ticks -= 
     90    ticks -=
    9191      _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
    9292
  • cpukit/posix/src/posixintervaltotimespec.c

    r1b4f2b30 r874297f3  
    2323 *  _POSIX_Interval_to_timespec
    2424 */
    25  
     25
    2626void _POSIX_Interval_to_timespec(
    2727  Watchdog_Interval  ticks,
     
    3434
    3535  time->tv_sec  = usecs / TOD_MICROSECONDS_PER_SECOND;
    36   time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 
     36  time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
    3737                    TOD_NANOSECONDS_PER_MICROSECOND;
    3838}
  • cpukit/posix/src/posixtimespecsubtract.c

    r1b4f2b30 r874297f3  
    3333  struct timespec *start = &start_struct;
    3434  uint32_t   nsecs_per_sec = TOD_NANOSECONDS_PER_SECOND;
    35  
     35
    3636  if (end->tv_nsec < start->tv_nsec) {
    3737    int seconds = (start->tv_nsec - end->tv_nsec) / nsecs_per_sec + 1;
     
    3939    start->tv_sec += seconds;
    4040  }
    41  
     41
    4242  if (end->tv_nsec - start->tv_nsec > nsecs_per_sec) {
    4343    int seconds = (start->tv_nsec - end->tv_nsec) / nsecs_per_sec;
     
    4545    start->tv_sec -= seconds;
    4646  }
    47  
     47
    4848  result->tv_sec  = end->tv_sec - start->tv_sec;
    4949  result->tv_nsec = end->tv_nsec - start->tv_nsec;
  • cpukit/posix/src/posixtimespectointerval.c

    r1b4f2b30 r874297f3  
    3030  Watchdog_Interval  ticks;
    3131
    32   ticks  = (time->tv_sec * TOD_MICROSECONDS_PER_SECOND) / 
     32  ticks  = (time->tv_sec * TOD_MICROSECONDS_PER_SECOND) /
    3333             _TOD_Microseconds_per_tick;
    3434
    35   ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 
     35  ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) /
    3636             _TOD_Microseconds_per_tick;
    3737
  • cpukit/posix/src/psignal.c

    r1b4f2b30 r874297f3  
    108108   *  restart the loop if a signal handler was invoked.
    109109   *
    110    *  The first thing done is to check there are any signals to be 
     110   *  The first thing done is to check there are any signals to be
    111111   *  processed at all.  No point in doing this loop otherwise.
    112112   */
     
    114114restart:
    115115  _ISR_Disable( level );
    116     if ( !(~api->signals_blocked & 
     116    if ( !(~api->signals_blocked &
    117117          (api->signals_pending | _POSIX_signals_Pending)) ) {
    118118     _ISR_Enable( level );
     
    137137    if ( _POSIX_signals_Check_signal( api, signo, FALSE ) )
    138138      goto restart;
    139  
     139
    140140    if ( _POSIX_signals_Check_signal( api, signo, TRUE ) )
    141141      goto restart;
     
    164164  );
    165165
    166   memcpy( 
     166  memcpy(
    167167    _POSIX_signals_Vectors,
    168168    _POSIX_signals_Default_vectors,
    169169    sizeof( _POSIX_signals_Vectors )
    170170  );
    171  
     171
    172172  /*
    173173   *  Initialize the set of pending signals for the entire process
     
    179179   *  Initialize the queue we use to block for signals
    180180   */
    181  
     181
    182182  _Thread_queue_Initialize(
    183183    &_POSIX_signals_Wait_queue,
     
    189189  /* XXX status codes */
    190190
    191   /* 
     191  /*
    192192   *  Allocate the siginfo pools.
    193193   */
  • cpukit/posix/src/psignalchecksignal.c

    r1b4f2b30 r874297f3  
    4646   *  Since we made a union of these, only one test is necessary but this is
    4747   *  safer.
    48    */ 
     48   */
    4949
    5050  assert( _POSIX_signals_Vectors[ signo ].sa_handler ||
    5151          _POSIX_signals_Vectors[ signo ].sa_sigaction );
    52  
     52
    5353  /*
    5454   *  Just to prevent sending a signal which is currently being ignored.
     
    8787   *  Restore the previous set of blocked signals
    8888   */
    89  
     89
    9090  api->signals_blocked = saved_signals_blocked;
    9191
  • cpukit/posix/src/psignalclearsignals.c

    r1b4f2b30 r874297f3  
    2828 *  _POSIX_signals_Clear_signals
    2929 */
    30  
     30
    3131boolean _POSIX_signals_Clear_signals(
    3232  POSIX_API_Control  *api,
     
    4242  boolean                     do_callout;
    4343  POSIX_signals_Siginfo_node *psiginfo;
    44  
     44
    4545  mask = signo_to_mask( signo );
    46  
     46
    4747  do_callout = FALSE;
    48  
     48
    4949  /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
    5050   * insures that no signals are blocked and all are checked.
     
    5858  /* XXX this is not right for siginfo type signals yet */
    5959  /* XXX since they can't be cleared the same way */
    60  
     60
    6161  _ISR_Disable( level );
    6262    if ( is_global ) {
     
    8686    }
    8787  _ISR_Enable( level );
    88   return do_callout; 
     88  return do_callout;
    8989}
  • cpukit/posix/src/psignalsetprocesssignals.c

    r1b4f2b30 r874297f3  
    2828 *  _POSIX_signals_Set_process_signals
    2929 */
    30  
     30
    3131void _POSIX_signals_Set_process_signals(
    3232  sigset_t   mask
     
    3434{
    3535  ISR_Level  level;
    36  
     36
    3737  _ISR_Disable( level );
    3838    if ( !_POSIX_signals_Pending )
  • cpukit/posix/src/psignalunblockthread.c

    r1b4f2b30 r874297f3  
    3131
    3232/* XXX this routine could probably be cleaned up */
    33 boolean _POSIX_signals_Unblock_thread( 
     33boolean _POSIX_signals_Unblock_thread(
    3434  Thread_Control  *the_thread,
    3535  int              signo,
     
    6363        *the_info = *info;
    6464      }
    65      
     65
    6666      _Thread_queue_Extract_with_proxy( the_thread );
    6767      return TRUE;
  • cpukit/posix/src/pthread.c

    r1b4f2b30 r874297f3  
    3030 *  The default pthreads attributes structure.
    3131 *
    32  *  NOTE: Be careful .. if the default attribute set changes, 
     32 *  NOTE: Be careful .. if the default attribute set changes,
    3333 *        _POSIX_Threads_Initialize_user_threads will need to be examined.
    3434 *
    3535 */
    36  
     36
    3737const pthread_attr_t _POSIX_Threads_Default_attributes = {
    3838  TRUE,                       /* is_initialized */
     
    7777
    7878  the_thread->cpu_time_budget = ticks;
    79  
     79
    8080  new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
    8181  the_thread->real_priority = new_priority;
     
    129129 *  XXX
    130130 */
    131  
     131
    132132boolean _POSIX_Threads_Create_extension(
    133133  Thread_Control *executing,
     
    137137  POSIX_API_Control *api;
    138138  POSIX_API_Control *executing_api;
    139  
     139
    140140  api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
    141  
     141
    142142  if ( !api )
    143143    return FALSE;
    144  
     144
    145145  created->API_Extensions[ THREAD_API_POSIX ] = api;
    146  
     146
    147147  /* XXX check all fields are touched */
    148148  api->Attributes  = _POSIX_Threads_Default_attributes;
     
    150150  api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
    151151  api->schedparam  = _POSIX_Threads_Default_attributes.schedparam;
    152   api->schedparam.sched_priority = 
     152  api->schedparam.sched_priority =
    153153     _POSIX_Priority_From_core( created->current_priority );
    154  
    155   /* 
     154
     155  /*
    156156   *  POSIX 1003.1 1996, 18.2.2.2
    157157   */
     
    181181    0
    182182  );
    183  
     183
    184184  _Watchdog_Initialize(
    185185    &api->Sporadic_timer,
     
    196196 *  _POSIX_Threads_Delete_extension
    197197 */
    198  
     198
    199199User_extensions_routine _POSIX_Threads_Delete_extension(
    200200  Thread_Control *executing,
     
    207207
    208208  api = deleted->API_Extensions[ THREAD_API_POSIX ];
    209  
     209
    210210  /*
    211211   *  Run the POSIX cancellation handlers
     
    217217   *  Wakeup all the tasks which joined with this one
    218218   */
    219  
     219
    220220  value_ptr = (void **) deleted->Wait.return_argument;
    221221
    222222  while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
    223223      *(void **)the_thread->Wait.return_argument = value_ptr;
    224  
     224
    225225  if ( api->schedpolicy == SCHED_SPORADIC )
    226226    (void) _Watchdog_Remove( &api->Sporadic_timer );
     
    235235 *  _POSIX_Threads_Exitted_extension
    236236 */
    237  
     237
    238238User_extensions_routine _POSIX_Threads_Exitted_extension(
    239239  Thread_Control *executing
     
    254254 *  Output parameters:  NONE
    255255 */
    256  
     256
    257257void _POSIX_Threads_Initialize_user_threads( void )
    258258{
     
    263263  pthread_t                           thread_id;
    264264  pthread_attr_t                      attr;
    265  
     265
    266266  user_threads = _POSIX_Threads_User_initialization_threads;
    267267  maximum      = _POSIX_Threads_Number_of_initialization_threads;
     
    269269  if ( !user_threads || maximum == 0 )
    270270    return;
    271  
     271
    272272  /*
    273273   *  Be careful .. if the default attribute set changes, this may need to.
    274274   *
    275275   *  Setting the attributes explicitly is critical, since we don't want
    276    *  to inherit the idle tasks attributes. 
     276   *  to inherit the idle tasks attributes.
    277277   */
    278278
     
    280280    status = pthread_attr_init( &attr );
    281281    assert( !status );
    282      
     282
    283283    status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    284284    assert( !status );
     
    308308  _POSIX_signals_Post_switch_extension,     /* post switch */
    309309};
    310  
     310
    311311User_extensions_Control _POSIX_Threads_User_extensions = {
    312312  { NULL, NULL },
     
    322322  }
    323323};
    324  
     324
    325325/*PAGE
    326326 *
     
    334334 *  Output parameters:  NONE
    335335 */
    336  
     336
    337337void _POSIX_Threads_Manager_initialization(
    338338  uint32_t                            maximum_pthreads,
    339339  uint32_t                            number_of_initialization_threads,
    340340  posix_initialization_threads_table *user_threads
    341  
    342 )
    343 {
    344   _POSIX_Threads_Number_of_initialization_threads = 
     341
     342)
     343{
     344  _POSIX_Threads_Number_of_initialization_threads =
    345345                                           number_of_initialization_threads;
    346346  _POSIX_Threads_User_initialization_threads = user_threads;
     
    374374   *  Add all the extensions for this API
    375375   */
    376  
     376
    377377  _User_extensions_Add_API_set( &_POSIX_Threads_User_extensions );
    378378
    379379  _API_extensions_Add( &_POSIX_Threads_API_extensions );
    380380
    381  
     381
    382382  /*
    383383   *  If we supported MP, then here we would ...
    384384   *       Register the MP Process Packet routine.
    385385   */
    386  
    387 }
     386
     387}
  • cpukit/posix/src/pthreadatfork.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  pthread_atfork() - POSIX 1003.1b 3.1.3
    33 *
  • cpukit/posix/src/pthreadcreate.c

    r1b4f2b30 r874297f3  
    6666   *  If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
    6767   *  inherits scheduling attributes from the creating thread.   If it is
    68    *  PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the 
     68   *  PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
    6969   *  attributes structure.
    7070   */
     
    7575      schedpolicy = api->schedpolicy;
    7676      schedparam  = api->schedparam;
    77       break; 
     77      break;
    7878
    7979    case PTHREAD_EXPLICIT_SCHED:
    8080      schedpolicy = the_attr->schedpolicy;
    8181      schedparam  = the_attr->schedparam;
    82       break; 
     82      break;
    8383
    8484    default:
     
    8787
    8888  /*
    89    *  Check the contentionscope since rtems only supports PROCESS wide 
     89   *  Check the contentionscope since rtems only supports PROCESS wide
    9090   *  contention (i.e. no system wide contention).
    9191   */
     
    100100  if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
    101101    return EINVAL;
    102  
     102
    103103  core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
    104  
     104
    105105  /*
    106106   *  Set the core scheduling policy information.
     
    114114      budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
    115115      break;
    116      
     116
    117117    case SCHED_FIFO:
    118118      budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
     
    126126      budget_algorithm  = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
    127127      budget_callout = _POSIX_Threads_Sporadic_budget_callout;
    128  
     128
    129129      if ( _POSIX_Timespec_to_interval( &schedparam.ss_replenish_period ) <
    130130           _POSIX_Timespec_to_interval( &schedparam.ss_initial_budget ) )
     
    141141
    142142  /*
    143    *  Currently all POSIX threads are floating point if the hardware 
     143   *  Currently all POSIX threads are floating point if the hardware
    144144   *  supports it.
    145145   */
     
    155155   *  Disable dispatch for protection
    156156   */
    157  
     157
    158158  _Thread_Disable_dispatch();
    159  
     159
    160160  /*
    161161   *  Allocate the thread control block.
     
    174174   *  Initialize the core thread for this task.
    175175   */
    176  
     176
    177177  status = _Thread_Initialize(
    178178    &_POSIX_Threads_Information,
     
    188188    NULL                  /* posix threads don't have a name */
    189189  );
    190  
     190
    191191  if ( !status ) {
    192192    _POSIX_Threads_Free( the_thread );
     
    199199   */
    200200
    201  
     201
    202202  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
    203203
  • cpukit/posix/src/pthreadkill.c

    r1b4f2b30 r874297f3  
    3838    rtems_set_errno_and_return_minus_one( EINVAL );
    3939
    40 /* commented out when posix timers added 
     40/* commented out when posix timers added
    4141  if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO )
    4242    rtems_set_errno_and_return_minus_one( ENOSYS );
  • cpukit/posix/src/pthreadsetschedparam.c

    r1b4f2b30 r874297f3  
    11/*
    2  *  13.5.2 Dynamic Thread Scheduling Parameters Access, 
     2 *  13.5.2 Dynamic Thread Scheduling Parameters Access,
    33 *         P1003.1c/Draft 10, p. 124
    44 *
     
    3636  Thread_CPU_budget_algorithm_callout  budget_callout;
    3737  Objects_Locations                    location;
    38  
     38
    3939  /*
    4040   *  Check all the parameters
     
    5454      budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
    5555      break;
    56  
     56
    5757    case SCHED_FIFO:
    5858      budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
    5959      break;
    60  
     60
    6161    case SCHED_RR:
    6262      budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
    6363      break;
    64  
     64
    6565    case SCHED_SPORADIC:
    6666      budget_algorithm  = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
    6767      budget_callout = _POSIX_Threads_Sporadic_budget_callout;
    68  
     68
    6969      if ( _POSIX_Timespec_to_interval( &param->ss_replenish_period ) <
    7070           _POSIX_Timespec_to_interval( &param->ss_initial_budget ) )
    7171        return EINVAL;
    72  
     72
    7373      if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
    7474        return EINVAL;
    75  
     75
    7676      break;
    77  
     77
    7878    default:
    7979      return EINVAL;
     
    115115          );
    116116          break;
    117  
     117
    118118        case SCHED_SPORADIC:
    119119          api->ss_high_priority = api->schedparam.sched_priority;
  • cpukit/posix/src/pthreadsigmask.c

    r1b4f2b30 r874297f3  
    4242  if ( oset )
    4343    *oset = api->signals_blocked;
    44  
     44
    4545  if ( !set )
    4646    return 0;
     
    6464  /* XXX evaluate the new set */
    6565
    66   if ( ~api->signals_blocked & 
     66  if ( ~api->signals_blocked &
    6767       (api->signals_pending | _POSIX_signals_Pending) ) {
    6868    _Thread_Executing->do_post_task_switch_extension = TRUE;
  • cpukit/posix/src/ptimer.c

    r1b4f2b30 r874297f3  
    66#include "config.h"
    77#endif
    8  
     8
    99#include <assert.h>
    1010#include <time.h>
     
    7474 * _POSIX_Timer_Manager_initialization
    7575 *
    76  *  Description: Initialize the internal structure in which the data of all 
     76 *  Description: Initialize the internal structure in which the data of all
    7777 *               the timers are stored
    7878 * ***************************************************************************/
     
    8989      max_timers * sizeof(POSIX_Timer_Control) );
    9090
    91    /* 
     91   /*
    9292    *  Initialize all the timers
    9393    */
  • cpukit/posix/src/ptimer1.c

    r1b4f2b30 r874297f3  
    66#include "config.h"
    77#endif
    8  
     8
    99#include <assert.h>
    1010#include <time.h>
     
    4040/*****************************/
    4141
    42 /* ************ 
     42/* ************
    4343 * Constants
    44  * ************/ 
     44 * ************/
    4545
    4646/*
     
    4949
    5050/*
    51  * Data for the signals 
     51 * Data for the signals
    5252 */
    5353
     
    5959 * TIMER_INITIALIZE_S
    6060 *
    61  *  Description: Initialize the data of a timer 
     61 *  Description: Initialize the data of a timer
    6262 * ***************************************************************************/
    6363
     
    6767 * _POSIX_Timer_Manager_initialization
    6868 *
    69  *  Description: Initialize the internal structure in which the data of all 
     69 *  Description: Initialize the internal structure in which the data of all
    7070 *               the timers are stored
    7171 * ***************************************************************************/
     
    7474
    7575/* ***************************************************************************
    76  * FIRST_FREE_POSITION_F 
     76 * FIRST_FREE_POSITION_F
    7777 *
    7878 *  Description: Returns the first free position in the table of timers.
    79  *               If there is not a free position, it returns NO_MORE_TIMERS_C 
     79 *               If there is not a free position, it returns NO_MORE_TIMERS_C
    8080 * ***************************************************************************/
    8181
     
    8989      }
    9090   }
    91    
     91
    9292   /* The function reaches this point only if all the position are occupied */
    9393
     
    9696
    9797/* ***************************************************************************
    98  * TIMER_POSITION_F 
     98 * TIMER_POSITION_F
    9999 *
    100100 *  Description: Returns the position in the table of timers in which the
     
    126126
    127127/* ***************************************************************************
    128  * COPY_ITIMERSPEC_S 
     128 * COPY_ITIMERSPEC_S
    129129 *
    130  *  Description: Does a copy of a variable of type struct itimerspec 
     130 *  Description: Does a copy of a variable of type struct itimerspec
    131131 * ***************************************************************************/
    132132
    133 void COPY_ITIMERSPEC_S ( const struct itimerspec *source, 
     133void COPY_ITIMERSPEC_S ( const struct itimerspec *source,
    134134                         struct itimerspec *target )
    135135{
     
    143143
    144144/* ***************************************************************************
    145  * ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S 
     145 * ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S
    146146 *
    147  *  Description: This function converts the data of a structure itimerspec 
    148  *               into structure rtems_time_of_day 
     147 *  Description: This function converts the data of a structure itimerspec
     148 *               into structure rtems_time_of_day
    149149 * ***************************************************************************/
    150150
    151 void ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S 
     151void ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S
    152152   ( const struct itimerspec *itimer, rtems_time_of_day *rtems_time )
    153153{
     
    155155
    156156   /* The leap years and the months with 28, 29 or 31 days have not been
    157     * considerated. It will be made in the future */ 
     157    * considerated. It will be made in the future */
    158158
    159159   seconds            = itimer->it_value.tv_sec;
     
    183183
    184184/* ***************************************************************************
    185  * FIRE_TIMER_S 
     185 * FIRE_TIMER_S
    186186 *
    187187 *  Description: This is the operation that is ran when a timer expires
     
    189189
    190190
    191 rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) 
    192 {
    193   int               timer_pos;  /* Position in the table of the timer that   
     191rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data)
     192{
     193  int               timer_pos;  /* Position in the table of the timer that
    194194                                 *  has expirated                            */
    195195  rtems_status_code return_v;   /* Return value of rtems_timer_fire_after    */
    196196  int               sig_number; /* Number of the signal to send              */
    197197
    198  
    199   /* The position of the table of timers that contains the data of the 
     198
     199  /* The position of the table of timers that contains the data of the
    200200   * expired timer will be stored in "timer_pos". In theory a timer can not
    201    * expire if it has not been created or has been deleted */ 
     201   * expire if it has not been created or has been deleted */
    202202
    203203  timer_pos = TIMER_POSITION_F(timer);
     
    212212     /* The timer must be reprogrammed */
    213213
    214      return_v = rtems_timer_fire_after ( timer, 
    215                                         timer_struct[timer_pos].ticks, 
    216                                         FIRE_TIMER_S, 
     214     return_v = rtems_timer_fire_after ( timer,
     215                                        timer_struct[timer_pos].ticks,
     216                                        FIRE_TIMER_S,
    217217                                        NULL );
    218218
    219      /* Stores the time when the timer was started again */ 
     219     /* Stores the time when the timer was started again */
    220220
    221221     timer_struct[timer_pos].time = _TOD_Current;
    222      
     222
    223223     /* The state has not to be actualized, because nothing modifies it */
    224224
     
    227227  } else {
    228228     /* Indicates that the timer is stopped */
    229  
     229
    230230     timer_struct[timer_pos].state = STATE_CREATE_STOP_C;
    231231
    232232  }
    233233
    234   /* 
     234  /*
    235235   * The sending of the signal to the process running the handling function
    236236   * specified for that signal is simulated
     
    242242                     timer_struct[timer_pos].inf.sigev_signo ) ) {
    243243     /* XXX error handling */
    244   } 
     244  }
    245245
    246246  /*
     
    253253}
    254254
    255 /* ********************************************************************* 
     255/* *********************************************************************
    256256 *  14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
    257257 * ********************************************************************/
     
    272272  int               timer_pos; /* Position in the table of timers  */
    273273
    274  /* 
     274 /*
    275275  *  The data of the structure evp are checked in order to verify if they
    276   *  are coherent. 
     276  *  are coherent.
    277277  */
    278278
    279279  if (evp != NULL) {
    280280    /* The structure has data */
    281     if ( ( evp->sigev_notify != SIGEV_NONE ) && 
     281    if ( ( evp->sigev_notify != SIGEV_NONE ) &&
    282282         ( evp->sigev_notify != SIGEV_SIGNAL ) ) {
    283283       /* The value of the field sigev_notify is not valid */
     
    285285     }
    286286  }
    287  
     287
    288288 /*
    289289  *  A timer is created using the primitive rtems_timer_create
     
    293293
    294294  switch (return_v) {
    295      case RTEMS_SUCCESSFUL : 
     295     case RTEMS_SUCCESSFUL :
    296296
    297297       /*
    298298        * The timer has been created properly
    299299        */
    300  
     300
    301301        /* Obtains the first free position in the table of timers */
    302302
     
    304304
    305305        if ( timer_pos == NO_MORE_TIMERS_C ) {
    306            /* There is not position for another timers in spite of RTEMS 
     306           /* There is not position for another timers in spite of RTEMS
    307307            * supports it. It will necessaty to increase the structure used */
    308308
     
    320320        /* NEW VERSION*/
    321321        timer_struct[timer_pos].thread_id = pthread_self ();
    322        
     322
    323323        if ( evp != NULL ) {
    324324           timer_struct[timer_pos].inf.sigev_notify = evp->sigev_notify;
     
    345345       /* There has been created too much timers for the same process */
    346346       rtems_set_errno_and_return_minus_one( EAGAIN );
    347      
     347
    348348     default :
    349349
     
    351351        * Does nothing. It only returns the error without assigning a value
    352352        * to errno. In theory, it can not happen because the call to
    353         * rtems_timer_create can not return other different value. 
     353        * rtems_timer_create can not return other different value.
    354354        */
    355355
     
    357357  }
    358358
    359   /* 
    360    * The next sentence is used to avoid singular situations 
     359  /*
     360   * The next sentence is used to avoid singular situations
    361361   */
    362362
     
    372372)
    373373{
    374  
     374
    375375 /*
    376376  * IDEA: This function must probably stop the timer first and then delete it
     
    378378  *       It will have to do a call to rtems_timer_cancel and then another
    379379  *       call to rtems_timer_delete.
    380   *       The call to rtems_timer_delete will be probably unnecessary, 
     380  *       The call to rtems_timer_delete will be probably unnecessary,
    381381  *       because rtems_timer_delete stops the timer before deleting it.
    382382  */
     
    430430   int               timer_pos;  /* Position of the timer in the table  */
    431431   rtems_time_of_day rtems_time; /* Time in RTEMS                       */
    432    
     432
    433433
    434434   /* First the position in the table of timers is obtained */
     
    449449
    450450   /* If the function reaches this point, then it will be necessary to do
    451     * something with the structure of times of the timer: to stop, start 
     451    * something with the structure of times of the timer: to stop, start
    452452    * or start it again */
    453453
     
    469469
    470470      /* Indicates that the timer is created and stopped */
    471  
     471
    472472      timer_struct[timer_pos].state = STATE_CREATE_STOP_C;
    473473
     
    477477   }
    478478
    479    /* 
     479   /*
    480480    * If the function reaches this point, then the timer will have to be
    481     * initialized with new values: to start it or start it again 
     481    * initialized with new values: to start it or start it again
    482482    */
    483  
     483
    484484   /* First, it verifies if the structure "value" is correct */
    485485
     
    494494    * ticks, to use it in the calls to RTEMS */
    495495
    496    /* It is also necessary to take in account if the time is absolute 
     496   /* It is also necessary to take in account if the time is absolute
    497497    * or relative */
    498498
     
    514514              /* The timer has been started and is running */
    515515
    516               /* Actualizes the data of the structure and 
     516              /* Actualizes the data of the structure and
    517517               * returns the old ones in "ovalue" */
    518518
     
    521521
    522522              timer_struct[timer_pos].timer_data = *value;
    523  
     523
    524524              /* It indicates that the time is running */
    525525
     
    550550           default: break;
    551551
    552        
     552
    553553        }
    554      
     554
    555555        break;
    556556
     
    562562        /* First, it converts from seconds and nanoseconds to ticks */
    563563
    564         /* The form in which this operation is done can produce a lost 
     564        /* The form in which this operation is done can produce a lost
    565565         * of precision of 1 second */
    566  
     566
    567567/*      This is the process to convert from nanoseconds to ticks
    568568 *
    569  *      There is a tick every 10 miliseconds, then the nanoseconds are 
     569 *      There is a tick every 10 miliseconds, then the nanoseconds are
    570570 *      divided between 10**7. The result of this operation will be the
    571  *      number of ticks 
     571 *      number of ticks
    572572 */
    573573
    574         timer_struct[timer_pos].ticks = 
     574        timer_struct[timer_pos].ticks =
    575575             ( SEC_TO_TICKS_C * value->it_value.tv_sec ) +
    576576             ( value->it_value.tv_nsec / (NSEC_PER_SEC_C / SEC_TO_TICKS_C));
    577577
    578         return_v = rtems_timer_fire_after ( timerid, 
    579                                            timer_struct[timer_pos].ticks, 
    580                                            FIRE_TIMER_S, 
     578        return_v = rtems_timer_fire_after ( timerid,
     579                                           timer_struct[timer_pos].ticks,
     580                                           FIRE_TIMER_S,
    581581                                           NULL );
    582582
     
    586586              /* The timer has been started and is running */
    587587
    588               /* Actualizes the data of the structure and 
     588              /* Actualizes the data of the structure and
    589589               * returns the old ones in "ovalue" */
    590590
     
    593593
    594594              timer_struct[timer_pos].timer_data = *value;
    595  
     595
    596596              /* It indicates that the time is running */
    597597
     
    601601
    602602              timer_struct[timer_pos].time = _TOD_Current;
    603  
     603
    604604              return 0;
    605605
     
    608608           case RTEMS_INVALID_ID:
    609609
    610               /* The timer identifier is not correct. In theory, this 
    611                * situation can not occur, but the solution is easy */ 
     610              /* The timer identifier is not correct. In theory, this
     611               * situation can not occur, but the solution is easy */
    612612
    613613              rtems_set_errno_and_return_minus_one( EINVAL );
     
    621621
    622622              /*
    623                * I do not know if errno must be actualized 
     623               * I do not know if errno must be actualized
    624624               *
    625625               * errno = EINVAL;
     
    628628              rtems_set_errno_and_return_minus_one( EINVAL );
    629629              break;
    630            
     630
    631631           default: break;
    632632        }
     
    636636      default: break;
    637637
    638         /* It does nothing, although it will be probably necessary to 
     638        /* It does nothing, although it will be probably necessary to
    639639         * return an error */
    640640   }
     
    659659{
    660660
    661  /* 
     661 /*
    662662  * IDEA:  This function does not use functions of RTEMS to the handle
    663663  *        of timers. It uses some functions for managing the time.
     
    665665  *        A possible form to do this is the following:
    666666  *
    667   *          - When a timer is initialized, the value of the time in 
     667  *          - When a timer is initialized, the value of the time in
    668668  *            that moment is stored.
    669669  *          - When this function is called, it returns the difference
    670670  *            between the current time and the initialization time.
    671671  */
    672  
     672
    673673  rtems_time_of_day current_time;
    674674  int               timer_pos;
     
    678678  uint32_t          ticks;
    679679  uint32_t          nanosec;
    680  
     680
    681681
    682682  /* Reads the current time */
     
    687687
    688688  if ( timer_pos == BAD_TIMER_C ) {
    689     /* The timer identifier is erroneus */ 
     689    /* The timer identifier is erroneus */
    690690    rtems_set_errno_and_return_minus_one( EINVAL );
    691691  }
     
    702702     minutes = current_time.minute - timer_struct[timer_pos].time.minute;
    703703  }
    704    
     704
    705705  if ( current_time.second < timer_struct[timer_pos].time.second ) {
    706706     seconds = 60 - timer_struct[timer_pos].time.second + current_time.second;
    707707     minutes--;
    708708  } else {
    709      seconds = current_time.second - timer_struct[timer_pos].time.second; 
     709     seconds = current_time.second - timer_struct[timer_pos].time.second;
    710710  }
    711711
     
    714714     seconds--;
    715715  } else {
    716      ticks = current_time.ticks - timer_struct[timer_pos].time.ticks; 
     716     ticks = current_time.ticks - timer_struct[timer_pos].time.ticks;
    717717  }
    718718
     
    720720  seconds = hours   * 60 * 60 +
    721721            minutes * 60      +
    722             seconds; 
     722            seconds;
    723723
    724724  nanosec  = ticks * 10 *  /* msec     */
     
    726726             1000;         /* nanosec  */
    727727
    728  
     728
    729729  /* Calculates the time left before the timer finishes */
    730  
    731   value->it_value.tv_sec = 
     730
     731  value->it_value.tv_sec =
    732732    timer_struct[timer_pos].timer_data.it_value.tv_sec - seconds;
    733  
    734   value->it_value.tv_nsec = 
     733
     734  value->it_value.tv_nsec =
    735735    timer_struct[timer_pos].timer_data.it_value.tv_nsec - nanosec;
    736736
    737737
    738   value->it_interval.tv_sec  = 
     738  value->it_interval.tv_sec  =
    739739    timer_struct[timer_pos].timer_data.it_interval.tv_sec;
    740   value->it_interval.tv_nsec = 
     740  value->it_interval.tv_nsec =
    741741    timer_struct[timer_pos].timer_data.it_interval.tv_nsec;
    742  
     742
    743743
    744744  return 0;
     
    761761 /*
    762762  * IDEA: This function must count the times the timer expires.
    763   *   
     763  *
    764764  *       The expiration of a timer must increase by one a counter.
    765   *       After the signal handler associated to the timer finishs 
     765  *       After the signal handler associated to the timer finishs
    766766  *       its execution, FIRE_TIMER_S will have to set this counter to 0.
    767767  */
  • cpukit/posix/src/sched.c

    r1b4f2b30 r874297f3  
    4747/*PAGE
    4848 *
    49  *  13.3.3 Set Scheduling Policy and Scheduling Parameters, 
     49 *  13.3.3 Set Scheduling Policy and Scheduling Parameters,
    5050 *         P1003.1b-1993, p. 254
    5151 */
     
    8787    case SCHED_SPORADIC:
    8888      break;
    89  
     89
    9090    default:
    9191      rtems_set_errno_and_return_minus_one( EINVAL );
     
    110110    case SCHED_SPORADIC:
    111111      break;
    112  
     112
    113113    default:
    114114      rtems_set_errno_and_return_minus_one( EINVAL );
  • cpukit/posix/src/semaphore.c

    r1b4f2b30 r874297f3  
    3232 *  Output parameters:  NONE
    3333 */
    34  
     34
    3535void _POSIX_Semaphore_Manager_initialization(
    3636  uint32_t   maximum_semaphores
  • cpukit/posix/src/semaphorecreatesupp.c

    r1b4f2b30 r874297f3  
    4242
    4343  _Thread_Disable_dispatch();
    44  
     44
    4545  /* Sharing semaphores among processes is not currently supported */
    4646  if (pshared != 0) {
     
    5050
    5151  if ( name ) {
    52     if( strlen(name) > PATH_MAX ) { 
     52    if( strlen(name) > PATH_MAX ) {
    5353      _Thread_Enable_dispatch();
    5454      rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
     
    5757
    5858  the_semaphore = _POSIX_Semaphore_Allocate();
    59  
     59
    6060  if ( !the_semaphore ) {
    6161    _Thread_Enable_dispatch();
    6262    rtems_set_errno_and_return_minus_one( ENOSPC );
    6363  }
    64  
     64
    6565#if defined(RTEMS_MULTIPROCESSING)
    6666  if ( pshared == PTHREAD_PROCESS_SHARED &&
     
    7272  }
    7373#endif
    74  
     74
    7575  the_semaphore->process_shared  = pshared;
    7676
     
    8080    the_semaphore->linked = TRUE;
    8181  }
    82   else 
     82  else
    8383    the_semaphore->named = FALSE;
    8484
    8585  the_sem_attr = &the_semaphore->Semaphore.Attributes;
    86  
     86
    8787  /*
    88    *  POSIX does not appear to specify what the discipline for 
    89    *  blocking tasks on this semaphore should be.  It could somehow 
     88   *  POSIX does not appear to specify what the discipline for
     89   *  blocking tasks on this semaphore should be.  It could somehow
    9090   *  be derived from the current scheduling policy.  One
    91    *  thing is certain, no matter what we decide, it won't be 
     91   *  thing is certain, no matter what we decide, it won't be
    9292   *  the same as  all other POSIX implementations. :)
    9393   */
     
    106106   *  Make the semaphore available for use.
    107107   */
    108  
     108
    109109  _Objects_Open(
    110110    &_POSIX_Semaphore_Information,
     
    112112    (char *) name
    113113  );
    114  
     114
    115115  *the_sem = the_semaphore;
    116  
     116
    117117#if defined(RTEMS_MULTIPROCESSING)
    118118  if ( pshared == PTHREAD_PROCESS_SHARED )
     
    124124    );
    125125#endif
    126  
     126
    127127  _Thread_Enable_dispatch();
    128128  return 0;
  • cpukit/posix/src/semaphoredeletesupp.c

    r1b4f2b30 r874297f3  
    3232  if ( !the_semaphore->linked && !the_semaphore->open_count ) {
    3333      _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object );
    34  
     34
    3535      _CORE_semaphore_Flush(
    3636        &the_semaphore->Semaphore,
  • cpukit/posix/src/semaphorenametoid.c

    r1b4f2b30 r874297f3  
    4242    return EINVAL;
    4343
    44   status = _Objects_Name_to_id( 
     44  status = _Objects_Name_to_id(
    4545    &_POSIX_Semaphore_Information, (char *)name, 0, (Objects_Id*)id );
    4646
  • cpukit/posix/src/semaphorewaitsupp.c

    r1b4f2b30 r874297f3  
    3434  register POSIX_Semaphore_Control *the_semaphore;
    3535  Objects_Locations                 location;
    36  
     36
    3737  the_semaphore = _POSIX_Semaphore_Get( sem, &location );
    3838  switch ( location ) {
  • cpukit/posix/src/semclose.c

    r1b4f2b30 r874297f3  
    2525 *
    2626 *  sem_close
    27  * 
     27 *
    2828 *  Routine to close a semaphore that has been opened or initialized.
    29  * 
     29 *
    3030 *  11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224
    3131 */
     
    3737  register POSIX_Semaphore_Control *the_semaphore;
    3838  Objects_Locations                 location;
    39  
     39
    4040  the_semaphore = _POSIX_Semaphore_Get( sem, &location );
    4141  switch ( location ) {
  • cpukit/posix/src/semdestroy.c

    r1b4f2b30 r874297f3  
    3232  register POSIX_Semaphore_Control *the_semaphore;
    3333  Objects_Locations                 location;
    34  
     34
    3535  the_semaphore = _POSIX_Semaphore_Get( sem, &location );
    3636  switch ( location ) {
     
    5050        rtems_set_errno_and_return_minus_one( EINVAL );
    5151      }
    52  
     52
    5353      _POSIX_Semaphore_Delete( the_semaphore );
    5454      _Thread_Enable_dispatch();
  • cpukit/posix/src/semgetvalue.c

    r1b4f2b30 r874297f3  
    3333  register POSIX_Semaphore_Control *the_semaphore;
    3434  Objects_Locations                 location;
    35  
     35
    3636  the_semaphore = _POSIX_Semaphore_Get( sem, &location );
    3737  switch ( location ) {
  • cpukit/posix/src/seminit.c

    r1b4f2b30 r874297f3  
    3737  if ( !sem )
    3838    rtems_set_errno_and_return_minus_one( EINVAL );
    39    
     39
    4040  status = _POSIX_Semaphore_Create_support(
    4141    NULL,
     
    4444    &the_semaphore
    4545  );
    46    
     46
    4747  if ( status != -1 )
    4848    *sem = the_semaphore->Object.id;
  • cpukit/posix/src/semopen.c

    r1b4f2b30 r874297f3  
    2424 *
    2525 *  sem_open
    26  * 
     26 *
    2727 *  Opens a named semaphore.  Used in conjunction with the sem_close
    2828 *  and sem_unlink commands.
     
    3030 *  11.2.3 Initialize/Open a Named Semaphore, P1003.1b-1993, p.221
    3131 *
    32  *  NOTE: When oflag is O_CREAT, then optional third and fourth 
     32 *  NOTE: When oflag is O_CREAT, then optional third and fourth
    3333 *        parameters must be present.
    3434 */
     
    4949  POSIX_Semaphore_Control   *the_semaphore;
    5050  Objects_Locations          location;
    51    
     51
    5252  _Thread_Disable_dispatch();
    5353
     
    6060
    6161  status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
    62    
     62
    6363  /*
    6464   *  If the name to id translation worked, then the semaphore exists
     
    7979      rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
    8080    }
    81   } else { 
     81  } else {
    8282
    8383    /*
     
    9696    return (sem_t *)&the_semaphore->Object.id;
    9797
    98   } 
    99  
    100   /* 
     98  }
     99
     100  /*
    101101   *  At this point, the semaphore does not exist and everything has been
    102102   *  checked. We should go ahead and create a semaphore.
     
    109109    &the_semaphore
    110110  );
    111  
     111
    112112  /*
    113113   * errno was set by Create_support, so don't set it again.
  • cpukit/posix/src/sempost.c

    r1b4f2b30 r874297f3  
    3232  register POSIX_Semaphore_Control *the_semaphore;
    3333  Objects_Locations                 location;
    34  
     34
    3535  the_semaphore = _POSIX_Semaphore_Get( sem, &location );
    3636  switch ( location ) {
  • cpukit/posix/src/semunlink.c

    r1b4f2b30 r874297f3  
    2424 *
    2525 *  sem_unlink
    26  * 
     26 *
    2727 *  Unlinks a named semaphore, sem_close must also be called to remove
    2828 *  the semaphore.
     
    3838  register POSIX_Semaphore_Control *the_semaphore;
    3939  sem_t                        the_semaphore_id;
    40  
     40
    4141  _Thread_Disable_dispatch();
    4242
     
    6060    _Objects_Get_index( the_semaphore_id )
    6161  );
    62  
     62
    6363#if defined(RTEMS_MULTIPROCESSING)
    6464  if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) {
  • cpukit/posix/src/setcancelstate.c

    r1b4f2b30 r874297f3  
    2424 */
    2525
    26 int pthread_setcancelstate( 
     26int pthread_setcancelstate(
    2727  int  state,
    2828  int *oldstate
     
    3737   */
    3838
    39   if ( _ISR_Is_in_progress() ) 
     39  if ( _ISR_Is_in_progress() )
    4040    return EPROTO;
    4141
     
    4747
    4848  thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
    49  
     49
    5050  _Thread_Disable_dispatch();
    5151    *oldstate = thread_support->cancelability_state;
    5252    thread_support->cancelability_state = state;
    53  
    54     if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 
     53
     54    if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
    5555         thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
    5656         thread_support->cancelation_requested )
    5757      _POSIX_Threads_cancel_run( _Thread_Executing );
    5858  _Thread_Enable_dispatch();
    59  
     59
    6060  return 0;
    6161}
  • cpukit/posix/src/setcanceltype.c

    r1b4f2b30 r874297f3  
    3030{
    3131  POSIX_API_Control                 *thread_support;
    32  
     32
    3333  /*
    3434   *  Don't even think about deleting a resource from an ISR.
     
    3737   */
    3838
    39   if ( _ISR_Is_in_progress() ) 
     39  if ( _ISR_Is_in_progress() )
    4040    return EPROTO;
    4141
    4242  if ( !oldtype )
    4343    return EINVAL;
    44  
     44
    4545  if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
    4646    return EINVAL;
    47  
     47
    4848  thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
    4949
     
    5252    thread_support->cancelability_type = type;
    5353
    54     if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 
     54    if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
    5555         thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
    5656         thread_support->cancelation_requested )
  • cpukit/posix/src/sigaction.c

    r1b4f2b30 r874297f3  
    4848  if ( !is_valid_signo(sig) )
    4949    rtems_set_errno_and_return_minus_one( EINVAL );
    50  
    51   /* 
     50
     51  /*
    5252   *  Some signals cannot be ignored (P1003.1b-1993, pp. 70-72 and references.
    5353   *
     
    5858  if ( sig == SIGKILL )
    5959    rtems_set_errno_and_return_minus_one( EINVAL );
    60  
     60
    6161  /*
    6262   *  Evaluate the new action structure and set the global signal vector
     
    8484   *  No need to evaluate or dispatch because:
    8585   *
    86    *    + If we were ignoring the signal before, none could be pending 
     86   *    + If we were ignoring the signal before, none could be pending
    8787   *      now (signals not posted when SIG_IGN).
    8888   *    + If we are now ignoring a signal that was previously pending,
  • cpukit/posix/src/sigtimedwait.c

    r1b4f2b30 r874297f3  
    6161  int                signo;
    6262  ISR_Level          level;
    63  
     63
    6464  /*
    6565   *  Error check parameters before disabling interrupts.
     
    125125    the_thread->Wait.option          = *set;
    126126    the_thread->Wait.return_argument = the_info;
    127     _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); 
     127    _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
    128128    _ISR_Enable( level );
    129     _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 
     129    _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
    130130  _Thread_Enable_dispatch();
    131131
  • cpukit/posix/src/testcancel.c

    r1b4f2b30 r874297f3  
    3434   */
    3535
    36   if ( _ISR_Is_in_progress() ) 
     36  if ( _ISR_Is_in_progress() )
    3737    return;
    3838
    3939  thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
    40  
     40
    4141  _Thread_Disable_dispatch();
    4242    if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
  • cpukit/posix/src/time.c

    r1b4f2b30 r874297f3  
    4242
    4343  seconds_since_epoch = _TOD_Seconds_since_epoch;
    44      
     44
    4545  seconds_since_epoch += POSIX_TIME_SECONDS_1970_THROUGH_1988;
    4646
  • cpukit/posix/src/ualarm.c

    r1b4f2b30 r874297f3  
    3030 *  _POSIX_signals_Ualarm_TSR
    3131 */
    32  
     32
    3333void _POSIX_signals_Ualarm_TSR(
    3434  Objects_Id      id,
     
    7474         */
    7575
    76        
     76
    7777        ticks = the_timer->initial -
    7878         ((the_timer->stop_time - the_timer->start_time) /
  • cpukit/posix/src/wait.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  waitpid() - POSIX 1003.1b 3.2.1
    33 *
  • cpukit/posix/src/waitpid.c

    r1b4f2b30 r874297f3  
    1 /* 
     1/*
    22 *  waitpid() - POSIX 1003.1 3.2.1
    33 *
Note: See TracChangeset for help on using the changeset viewer.