Changeset 3c465878 in rtems


Ignore:
Timestamp:
Jul 1, 2002, 10:33:47 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
2e2cf921
Parents:
90015e7f
Message:

2002-07-01 Joel Sherrill <joel@…>

  • Mega patch merge to change the format of the object IDs to loosen the dependency between the SCORE and the various APIs. There was considerable work to simplify the object name management and it appears that the name_table field is no longer needed. This patch also includes the addition of the internal mutex which is currently only used to protect some types of allocation and deallocation. This significantly can reduce context switch latency under certain circumstances. In particular, some heap/region operations were O(n) and had dispatching disabled. This should help enormously. With this merge, the patch is not as clean as it should be. In particular, the documentation has not been modified to reflect the new object ID layout, the IDs in the test screens are not updated, and _Objects_Get_information needs to be a real routine not inlined. As part of this patch a lot of MP code for thread/proxy blocking was made conditional and cleaned up.
  • include/rtems/posix/key.h, src/cond.c, src/condinit.c, src/intr.c, src/key.c, src/keycreate.c, src/keydelete.c, src/killinfo.c, src/mqueue.c, src/mqueuecreatesupp.c, src/mutex.c, src/mutexinit.c, src/psignal.c, src/pthread.c, src/semaphore.c, src/semaphorecreatesupp.c: Modified as part of above.
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/ChangeLog

    r90015e7f r3c465878  
     12002-07-01    Joel Sherrill <joel@OARcorp.com>
     2
     3        * Mega patch merge to change the format of the object IDs to
     4        loosen the dependency between the SCORE and the various APIs.
     5        There was considerable work to simplify the object name management
     6        and it appears that the name_table field is no longer needed.
     7        This patch also includes the addition of the internal mutex
     8        which is currently only used to protect some types of allocation
     9        and deallocation.  This significantly can reduce context
     10        switch latency under certain circumstances.  In particular,
     11        some heap/region operations were O(n) and had dispatching
     12        disabled.  This should help enormously.  With this merge,
     13        the patch is not as clean as it should be.  In particular,
     14        the documentation has not been modified to reflect the new object
     15        ID layout, the IDs in the test screens are not updated, and
     16        _Objects_Get_information needs to be a real routine not inlined.
     17        As part of this patch a lot of MP code for thread/proxy blocking
     18        was made conditional and cleaned up.
     19        * include/rtems/posix/key.h, src/cond.c, src/condinit.c, src/intr.c,
     20        src/key.c, src/keycreate.c, src/keydelete.c, src/killinfo.c,
     21        src/mqueue.c, src/mqueuecreatesupp.c, src/mutex.c, src/mutexinit.c,
     22        src/psignal.c, src/pthread.c, src/semaphore.c,
     23        src/semaphorecreatesupp.c:  Modified as part of above.
     24
    1252002-07-01      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    226
  • c/src/exec/posix/include/rtems/posix/key.h

    r90015e7f r3c465878  
    3232   boolean             is_active;
    3333   void              (*destructor)( void * );
    34    void              **Values[ OBJECTS_CLASSES_LAST_THREAD_CLASS + 1 ];
     34   void              **Values[ OBJECTS_APIS_LAST + 1 ];
    3535}  POSIX_Keys_Control;
    3636
  • c/src/exec/posix/src/cond.c

    r90015e7f r3c465878  
    3636{
    3737  _Objects_Initialize_information(
    38     &_POSIX_Condition_variables_Information,
    39     OBJECTS_POSIX_CONDITION_VARIABLES,
    40     TRUE,
    41     maximum_condition_variables,
     38    &_POSIX_Condition_variables_Information, /* object information table */
     39    OBJECTS_POSIX_API,                       /* object API */
     40    OBJECTS_POSIX_CONDITION_VARIABLES,       /* object class */
     41    maximum_condition_variables,             /* maximum objects of this class */
    4242    sizeof( POSIX_Condition_variables_Control ),
    43     FALSE,
    44     0,
    45     FALSE
    46   );
     43                                /* size of this object's control block */
     44    FALSE,                      /* TRUE if names for this object are strings */
     45    0                           /* maximum length of each object's name */
     46#if defined(RTEMS_MULTIPROCESSING)
     47    ,
     48    FALSE,                      /* TRUE if this is a global object class */
     49    NULL                        /* Proxy extraction support callout */
     50#endif
     51  );
    4752}
  • c/src/exec/posix/src/condinit.c

    r90015e7f r3c465878  
    7171  _Thread_queue_Initialize(
    7272    &the_cond->Wait_queue,
    73     OBJECTS_POSIX_CONDITION_VARIABLES,
    7473    THREAD_QUEUE_DISCIPLINE_FIFO,
    7574    STATES_WAITING_FOR_CONDITION_VARIABLE,
    76 #if defined(RTEMS_MULTIPROCESSING)
    77     _POSIX_Condition_variables_MP_Send_extract_proxy,
    78 #else
    79     NULL,
    80 #endif
    8175    ETIMEDOUT
    8276  );
  • c/src/exec/posix/src/intr.c

    r90015e7f r3c465878  
    4242
    4343  _Objects_Initialize_information(
    44     &_POSIX_Interrupt_Handlers_Information,
    45     OBJECTS_POSIX_INTERRUPTS,
    46     FALSE,
    47     maximum_interrupt_handlers,
     44    &_POSIX_Interrupt_Handlers_Information,  /* object information table */
     45    OBJECTS_POSIX_API,                       /* object API */
     46    OBJECTS_POSIX_INTERRUPTS,                /* object class */
     47    maximum_interrupt_handlers,              /* maximum objects of this class */
    4848    sizeof( POSIX_Interrupt_Handler_control ),
    49     FALSE,
    50     0,
    51     FALSE
     49                                /* size of this object's control block */
     50    FALSE,                      /* TRUE if names for this object are strings */
     51    0                           /* maximum length of each object's name */
     52#if defined(RTEMS_MULTIPROCESSING)
     53    ,
     54    FALSE,                      /* TRUE if this is a global object class */
     55    NULL                        /* Proxy extraction support callout */
     56#endif
    5257  );
    5358
  • c/src/exec/posix/src/key.c

    r90015e7f r3c465878  
    3030{
    3131  _Objects_Initialize_information(
    32     &_POSIX_Keys_Information,
    33     OBJECTS_POSIX_KEYS,
    34     FALSE,
    35     maximum_keys,
     32    &_POSIX_Keys_Information,   /* object information table */
     33    OBJECTS_POSIX_API,          /* object API */
     34    OBJECTS_POSIX_KEYS,         /* object class */
     35    maximum_keys,               /* maximum objects of this class */
    3636    sizeof( POSIX_Keys_Control ),
    37     FALSE,
    38     0,
    39     FALSE
     37                                /* size of this object's control block */
     38    FALSE,                      /* TRUE if names for this object are strings */
     39    0                           /* maximum length of each object's name */
     40#if defined(RTEMS_MULTIPROCESSING)
     41    ,
     42    FALSE,                      /* TRUE if this is a global object class */
     43    NULL                        /* Proxy extraction support callout */
     44#endif
    4045  );
    4146}
  • c/src/exec/posix/src/keycreate.c

    r90015e7f r3c465878  
    2929  POSIX_Keys_Control  *the_key;
    3030  void                *table;
    31   unsigned32           the_class;
     31  unsigned32           the_api;
    3232  unsigned32           bytes_to_allocate;
    3333
     
    5050   */
    5151
    52   for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    53         the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
    54         the_class++ ) {
     52  for ( the_api = 1;
     53        the_api <= OBJECTS_APIS_LAST;
     54        the_api++ ) {
    5555
    56     if ( _Objects_Information_table[ the_class ] ) {
     56    if ( _Objects_Information_table[ the_api ] &&
     57         _Objects_Information_table[ the_api ][ 1 ] ) {
    5758      bytes_to_allocate = sizeof( void * ) *
    58         (_Objects_Information_table[ the_class ]->maximum + 1);
     59        (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
    5960      table = _Workspace_Allocate( bytes_to_allocate );
    6061      if ( !table ) {
    61         for ( --the_class;
    62               the_class >= OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    63               the_class-- )
    64           _Workspace_Free( the_key->Values[ the_class ] );
     62        for ( --the_api;
     63              the_api >= 1;
     64              the_api-- )
     65          _Workspace_Free( the_key->Values[ the_api ] );
    6566 
    6667        _POSIX_Keys_Free( the_key );
     
    6970      }
    7071
    71       the_key->Values[ the_class ] = table;
     72      the_key->Values[ the_api ] = table;
    7273      memset( table, '\0', bytes_to_allocate );
    7374    } else {
    74       the_key->Values[ the_class ] = NULL;
     75      the_key->Values[ the_api ] = NULL;
    7576    }
    7677
  • c/src/exec/posix/src/keydelete.c

    r90015e7f r3c465878  
    2828  register POSIX_Keys_Control *the_key;
    2929  Objects_Locations            location;
    30   unsigned32                   the_class;
     30  unsigned32                   the_api;
    3131 
    3232  the_key = _POSIX_Keys_Get( key, &location );
     
    4040      the_key->is_active = FALSE;
    4141
    42       for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    43             the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
    44             the_class++ )
    45         if ( the_key->Values[ the_class ] )
    46           _Workspace_Free( the_key->Values[ the_class ] );
     42      for ( the_api = 1;
     43            the_api <= OBJECTS_APIS_LAST;
     44            the_api++ )
     45        if ( the_key->Values[ the_api ] )
     46          _Workspace_Free( the_key->Values[ the_api ] );
    4747
    4848      /*
  • c/src/exec/posix/src/killinfo.c

    r90015e7f r3c465878  
    4545  sigset_t                     mask;
    4646  POSIX_API_Control           *api;
    47   unsigned32                   the_class;
     47  unsigned32                   the_api;
    4848  unsigned32                   index;
    4949  unsigned32                   maximum;
     
    171171  interested_priority = PRIORITY_MAXIMUM + 1;
    172172
    173   for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    174         the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
    175         the_class++ ) {
    176 
    177     if ( the_class == OBJECTS_INTERNAL_THREADS )
     173  for ( the_api = 2;
     174        the_api <= OBJECTS_APIS_LAST;
     175        the_api++ ) {
     176
     177    if ( the_api == OBJECTS_INTERNAL_THREADS )
    178178      continue;
    179179
    180     the_info = _Objects_Information_table[ the_class ];
     180    if ( !_Objects_Information_table[ the_api ] )  /* API not installed */
     181      continue;
     182
     183    the_info = _Objects_Information_table[ the_api ][ 1 ];
    181184
    182185    if ( !the_info )                        /* manager not installed */
  • c/src/exec/posix/src/mqueue.c

    r90015e7f r3c465878  
    5050{
    5151  _Objects_Initialize_information(
    52     &_POSIX_Message_queue_Information,
    53     OBJECTS_POSIX_MESSAGE_QUEUES,
    54     TRUE,
    55     maximum_message_queues,
     52    &_POSIX_Message_queue_Information, /* object information table */
     53    OBJECTS_POSIX_API,                 /* object API */
     54    OBJECTS_POSIX_MESSAGE_QUEUES,      /* object class */
     55    maximum_message_queues,            /* maximum objects of this class */
    5656    sizeof( POSIX_Message_queue_Control ),
    57     TRUE,
    58     _POSIX_PATH_MAX,
    59     FALSE
     57                                /* size of this object's control block */
     58    FALSE,                      /* TRUE if names for this object are strings */
     59    _POSIX_PATH_MAX             /* maximum length of each object's name */
     60#if defined(RTEMS_MULTIPROCESSING)
     61    ,
     62    FALSE,                      /* TRUE if this is a global object class */
     63    NULL                        /* Proxy extraction support callout */
     64#endif
    6065  );
    6166  _Objects_Initialize_information(
    6267    &_POSIX_Message_queue_Information_fds,
     68    OBJECTS_POSIX_API,
    6369    OBJECTS_POSIX_MESSAGE_QUEUE_FDS,
    64     FALSE,
    6570    maximum_message_queues,
    6671    sizeof( POSIX_Message_queue_Control_fd ),
    67     FALSE,
    68     0,
    69     FALSE
     72                                /* size of this object's control block */
     73    FALSE,                      /* TRUE if names for this object are strings */
     74    0                           /* maximum length of each object's name */
     75#if defined(RTEMS_MULTIPROCESSING)
     76    ,
     77    FALSE,                      /* TRUE if this is a global object class */
     78    NULL                        /* Proxy extraction support callout */
     79#endif
    7080  );
    7181}
  • c/src/exec/posix/src/mqueuecreatesupp.c

    r90015e7f r3c465878  
    112112  if ( ! _CORE_message_queue_Initialize(
    113113           &the_mq->Message_queue,
    114            OBJECTS_POSIX_MESSAGE_QUEUES,
    115114           the_mq_attr,
    116115           attr.mq_maxmsg,
    117            attr.mq_msgsize,
    118 #if 0 && defined(RTEMS_MULTIPROCESSING)
    119            _POSIX_Message_queue_MP_Send_extract_proxy
    120 #else
    121            NULL
    122 #endif
     116           attr.mq_msgsize
    123117      ) ) {
    124118
  • c/src/exec/posix/src/mutex.c

    r90015e7f r3c465878  
    3838{
    3939  _Objects_Initialize_information(
    40     &_POSIX_Mutex_Information,
    41     OBJECTS_POSIX_MUTEXES,
    42     TRUE,
    43     maximum_mutexes,
     40    &_POSIX_Mutex_Information,  /* object information table */
     41    OBJECTS_POSIX_API,          /* object API */
     42    OBJECTS_POSIX_MUTEXES,      /* object class */
     43    maximum_mutexes,            /* maximum objects of this class */
    4444    sizeof( POSIX_Mutex_Control ),
    45     FALSE,
    46     0,
    47     FALSE
     45                                /* size of this object's control block */
     46    FALSE,                      /* TRUE if names for this object are strings */
     47    0                           /* maximum length of each object's name */
     48#if defined(RTEMS_MULTIPROCESSING)
     49    ,
     50    FALSE,                      /* TRUE if this is a global object class */
     51    NULL                        /* Proxy extraction support callout */
     52#endif
    4853  );
    4954}
  • c/src/exec/posix/src/mutexinit.c

    r90015e7f r3c465878  
    164164  _CORE_mutex_Initialize(
    165165    &the_mutex->Mutex,
    166     OBJECTS_POSIX_MUTEXES,
    167166    the_mutex_attr,
    168     CORE_MUTEX_UNLOCKED,
    169     NULL                      /* proxy_extract_callout */
     167    CORE_MUTEX_UNLOCKED
    170168  );
    171169
  • c/src/exec/posix/src/psignal.c

    r90015e7f r3c465878  
    226226  _Thread_queue_Initialize(
    227227    &_POSIX_signals_Wait_queue,
    228     OBJECTS_NO_CLASS,
    229228    THREAD_QUEUE_DISCIPLINE_PRIORITY,
    230229    STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
    231     NULL,
    232230    EAGAIN
    233231  );
  • c/src/exec/posix/src/pthread.c

    r90015e7f r3c465878  
    168168  /* XXX use signal constants */
    169169  api->signals_pending = 0;
    170   if ( _Objects_Get_class( created->Object.id ) == OBJECTS_POSIX_THREADS ) {
     170  if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
     171       _Objects_Get_class( created->Object.id ) == 1 ) {
    171172    executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
    172173    api->signals_blocked = api->signals_blocked;
     
    174175    api->signals_blocked = 0xffffffff;
    175176
    176 /* XXX set signal parameters -- block all signals for non-posix threads */
    177 
    178177  _Thread_queue_Initialize(
    179178    &api->Join_List,
    180     OBJECTS_NO_CLASS,                 /* only used for proxy operations */
    181179    THREAD_QUEUE_DISCIPLINE_FIFO,
    182180    STATES_WAITING_FOR_JOIN_AT_EXIT,
    183     NULL,                             /* no extract proxy handler */
    184181    0
    185182  );
     
    357354
    358355  _Objects_Initialize_information(
    359     &_POSIX_Threads_Information,
    360     OBJECTS_POSIX_THREADS,
    361     FALSE,                               /* does not support global */
    362     maximum_pthreads,
     356    &_POSIX_Threads_Information, /* object information table */
     357    OBJECTS_POSIX_API,           /* object API */
     358    OBJECTS_POSIX_THREADS,       /* object class */
     359    maximum_pthreads,            /* maximum objects of this class */
    363360    sizeof( Thread_Control ),
    364     FALSE,
    365     0,                                   /* length is arbitrary for now */
    366     TRUE                                 /* this class is threads */
     361                                 /* size of this object's control block */
     362    FALSE,                       /* TRUE if names for this object are strings */
     363    0                            /* maximum length of each object's name */
     364#if defined(RTEMS_MULTIPROCESSING)
     365    ,
     366    FALSE,                       /* TRUE if this is a global object class */
     367    NULL                         /* Proxy extraction support callout */
     368#endif
    367369  );
    368370
  • c/src/exec/posix/src/semaphore.c

    r90015e7f r3c465878  
    3838{
    3939  _Objects_Initialize_information(
    40     &_POSIX_Semaphore_Information,
    41     OBJECTS_POSIX_SEMAPHORES,
    42     TRUE,
    43     maximum_semaphores,
     40    &_POSIX_Semaphore_Information, /* object information table */
     41    OBJECTS_POSIX_API,             /* object API */
     42    OBJECTS_POSIX_SEMAPHORES,      /* object class */
     43    maximum_semaphores             /* maximum objects of this class */,
    4444    sizeof( POSIX_Semaphore_Control ),
    45     TRUE,
    46     _POSIX_PATH_MAX,
    47     FALSE
     45                                /* size of this object's control block */
     46    FALSE,                      /* TRUE if names for this object are strings */
     47    _POSIX_PATH_MAX             /* maximum length of each object's name */
     48#if defined(RTEMS_MULTIPROCESSING)
     49    ,
     50    FALSE,                      /* TRUE if this is a global object class */
     51    NULL                        /* Proxy extraction support callout */
     52#endif
    4853  );
    4954}
  • c/src/exec/posix/src/semaphorecreatesupp.c

    r90015e7f r3c465878  
    101101  the_sem_attr->maximum_count = 0xFFFFFFFF;
    102102
    103   _CORE_semaphore_Initialize(
    104     &the_semaphore->Semaphore,
    105     OBJECTS_POSIX_SEMAPHORES,
    106     the_sem_attr,
    107     value,
    108     NULL                 /* multiprocessing is not supported */
    109   );
     103  _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
    110104
    111105  /*
  • cpukit/posix/ChangeLog

    r90015e7f r3c465878  
     12002-07-01    Joel Sherrill <joel@OARcorp.com>
     2
     3        * Mega patch merge to change the format of the object IDs to
     4        loosen the dependency between the SCORE and the various APIs.
     5        There was considerable work to simplify the object name management
     6        and it appears that the name_table field is no longer needed.
     7        This patch also includes the addition of the internal mutex
     8        which is currently only used to protect some types of allocation
     9        and deallocation.  This significantly can reduce context
     10        switch latency under certain circumstances.  In particular,
     11        some heap/region operations were O(n) and had dispatching
     12        disabled.  This should help enormously.  With this merge,
     13        the patch is not as clean as it should be.  In particular,
     14        the documentation has not been modified to reflect the new object
     15        ID layout, the IDs in the test screens are not updated, and
     16        _Objects_Get_information needs to be a real routine not inlined.
     17        As part of this patch a lot of MP code for thread/proxy blocking
     18        was made conditional and cleaned up.
     19        * include/rtems/posix/key.h, src/cond.c, src/condinit.c, src/intr.c,
     20        src/key.c, src/keycreate.c, src/keydelete.c, src/killinfo.c,
     21        src/mqueue.c, src/mqueuecreatesupp.c, src/mutex.c, src/mutexinit.c,
     22        src/psignal.c, src/pthread.c, src/semaphore.c,
     23        src/semaphorecreatesupp.c:  Modified as part of above.
     24
    1252002-07-01      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    226
  • cpukit/posix/include/rtems/posix/key.h

    r90015e7f r3c465878  
    3232   boolean             is_active;
    3333   void              (*destructor)( void * );
    34    void              **Values[ OBJECTS_CLASSES_LAST_THREAD_CLASS + 1 ];
     34   void              **Values[ OBJECTS_APIS_LAST + 1 ];
    3535}  POSIX_Keys_Control;
    3636
  • cpukit/posix/src/cond.c

    r90015e7f r3c465878  
    3636{
    3737  _Objects_Initialize_information(
    38     &_POSIX_Condition_variables_Information,
    39     OBJECTS_POSIX_CONDITION_VARIABLES,
    40     TRUE,
    41     maximum_condition_variables,
     38    &_POSIX_Condition_variables_Information, /* object information table */
     39    OBJECTS_POSIX_API,                       /* object API */
     40    OBJECTS_POSIX_CONDITION_VARIABLES,       /* object class */
     41    maximum_condition_variables,             /* maximum objects of this class */
    4242    sizeof( POSIX_Condition_variables_Control ),
    43     FALSE,
    44     0,
    45     FALSE
    46   );
     43                                /* size of this object's control block */
     44    FALSE,                      /* TRUE if names for this object are strings */
     45    0                           /* maximum length of each object's name */
     46#if defined(RTEMS_MULTIPROCESSING)
     47    ,
     48    FALSE,                      /* TRUE if this is a global object class */
     49    NULL                        /* Proxy extraction support callout */
     50#endif
     51  );
    4752}
  • cpukit/posix/src/condinit.c

    r90015e7f r3c465878  
    7171  _Thread_queue_Initialize(
    7272    &the_cond->Wait_queue,
    73     OBJECTS_POSIX_CONDITION_VARIABLES,
    7473    THREAD_QUEUE_DISCIPLINE_FIFO,
    7574    STATES_WAITING_FOR_CONDITION_VARIABLE,
    76 #if defined(RTEMS_MULTIPROCESSING)
    77     _POSIX_Condition_variables_MP_Send_extract_proxy,
    78 #else
    79     NULL,
    80 #endif
    8175    ETIMEDOUT
    8276  );
  • cpukit/posix/src/intr.c

    r90015e7f r3c465878  
    4242
    4343  _Objects_Initialize_information(
    44     &_POSIX_Interrupt_Handlers_Information,
    45     OBJECTS_POSIX_INTERRUPTS,
    46     FALSE,
    47     maximum_interrupt_handlers,
     44    &_POSIX_Interrupt_Handlers_Information,  /* object information table */
     45    OBJECTS_POSIX_API,                       /* object API */
     46    OBJECTS_POSIX_INTERRUPTS,                /* object class */
     47    maximum_interrupt_handlers,              /* maximum objects of this class */
    4848    sizeof( POSIX_Interrupt_Handler_control ),
    49     FALSE,
    50     0,
    51     FALSE
     49                                /* size of this object's control block */
     50    FALSE,                      /* TRUE if names for this object are strings */
     51    0                           /* maximum length of each object's name */
     52#if defined(RTEMS_MULTIPROCESSING)
     53    ,
     54    FALSE,                      /* TRUE if this is a global object class */
     55    NULL                        /* Proxy extraction support callout */
     56#endif
    5257  );
    5358
  • cpukit/posix/src/key.c

    r90015e7f r3c465878  
    3030{
    3131  _Objects_Initialize_information(
    32     &_POSIX_Keys_Information,
    33     OBJECTS_POSIX_KEYS,
    34     FALSE,
    35     maximum_keys,
     32    &_POSIX_Keys_Information,   /* object information table */
     33    OBJECTS_POSIX_API,          /* object API */
     34    OBJECTS_POSIX_KEYS,         /* object class */
     35    maximum_keys,               /* maximum objects of this class */
    3636    sizeof( POSIX_Keys_Control ),
    37     FALSE,
    38     0,
    39     FALSE
     37                                /* size of this object's control block */
     38    FALSE,                      /* TRUE if names for this object are strings */
     39    0                           /* maximum length of each object's name */
     40#if defined(RTEMS_MULTIPROCESSING)
     41    ,
     42    FALSE,                      /* TRUE if this is a global object class */
     43    NULL                        /* Proxy extraction support callout */
     44#endif
    4045  );
    4146}
  • cpukit/posix/src/keycreate.c

    r90015e7f r3c465878  
    2929  POSIX_Keys_Control  *the_key;
    3030  void                *table;
    31   unsigned32           the_class;
     31  unsigned32           the_api;
    3232  unsigned32           bytes_to_allocate;
    3333
     
    5050   */
    5151
    52   for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    53         the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
    54         the_class++ ) {
     52  for ( the_api = 1;
     53        the_api <= OBJECTS_APIS_LAST;
     54        the_api++ ) {
    5555
    56     if ( _Objects_Information_table[ the_class ] ) {
     56    if ( _Objects_Information_table[ the_api ] &&
     57         _Objects_Information_table[ the_api ][ 1 ] ) {
    5758      bytes_to_allocate = sizeof( void * ) *
    58         (_Objects_Information_table[ the_class ]->maximum + 1);
     59        (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
    5960      table = _Workspace_Allocate( bytes_to_allocate );
    6061      if ( !table ) {
    61         for ( --the_class;
    62               the_class >= OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    63               the_class-- )
    64           _Workspace_Free( the_key->Values[ the_class ] );
     62        for ( --the_api;
     63              the_api >= 1;
     64              the_api-- )
     65          _Workspace_Free( the_key->Values[ the_api ] );
    6566 
    6667        _POSIX_Keys_Free( the_key );
     
    6970      }
    7071
    71       the_key->Values[ the_class ] = table;
     72      the_key->Values[ the_api ] = table;
    7273      memset( table, '\0', bytes_to_allocate );
    7374    } else {
    74       the_key->Values[ the_class ] = NULL;
     75      the_key->Values[ the_api ] = NULL;
    7576    }
    7677
  • cpukit/posix/src/keydelete.c

    r90015e7f r3c465878  
    2828  register POSIX_Keys_Control *the_key;
    2929  Objects_Locations            location;
    30   unsigned32                   the_class;
     30  unsigned32                   the_api;
    3131 
    3232  the_key = _POSIX_Keys_Get( key, &location );
     
    4040      the_key->is_active = FALSE;
    4141
    42       for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    43             the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
    44             the_class++ )
    45         if ( the_key->Values[ the_class ] )
    46           _Workspace_Free( the_key->Values[ the_class ] );
     42      for ( the_api = 1;
     43            the_api <= OBJECTS_APIS_LAST;
     44            the_api++ )
     45        if ( the_key->Values[ the_api ] )
     46          _Workspace_Free( the_key->Values[ the_api ] );
    4747
    4848      /*
  • cpukit/posix/src/killinfo.c

    r90015e7f r3c465878  
    4545  sigset_t                     mask;
    4646  POSIX_API_Control           *api;
    47   unsigned32                   the_class;
     47  unsigned32                   the_api;
    4848  unsigned32                   index;
    4949  unsigned32                   maximum;
     
    171171  interested_priority = PRIORITY_MAXIMUM + 1;
    172172
    173   for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS;
    174         the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS;
    175         the_class++ ) {
    176 
    177     if ( the_class == OBJECTS_INTERNAL_THREADS )
     173  for ( the_api = 2;
     174        the_api <= OBJECTS_APIS_LAST;
     175        the_api++ ) {
     176
     177    if ( the_api == OBJECTS_INTERNAL_THREADS )
    178178      continue;
    179179
    180     the_info = _Objects_Information_table[ the_class ];
     180    if ( !_Objects_Information_table[ the_api ] )  /* API not installed */
     181      continue;
     182
     183    the_info = _Objects_Information_table[ the_api ][ 1 ];
    181184
    182185    if ( !the_info )                        /* manager not installed */
  • cpukit/posix/src/mqueue.c

    r90015e7f r3c465878  
    5050{
    5151  _Objects_Initialize_information(
    52     &_POSIX_Message_queue_Information,
    53     OBJECTS_POSIX_MESSAGE_QUEUES,
    54     TRUE,
    55     maximum_message_queues,
     52    &_POSIX_Message_queue_Information, /* object information table */
     53    OBJECTS_POSIX_API,                 /* object API */
     54    OBJECTS_POSIX_MESSAGE_QUEUES,      /* object class */
     55    maximum_message_queues,            /* maximum objects of this class */
    5656    sizeof( POSIX_Message_queue_Control ),
    57     TRUE,
    58     _POSIX_PATH_MAX,
    59     FALSE
     57                                /* size of this object's control block */
     58    FALSE,                      /* TRUE if names for this object are strings */
     59    _POSIX_PATH_MAX             /* maximum length of each object's name */
     60#if defined(RTEMS_MULTIPROCESSING)
     61    ,
     62    FALSE,                      /* TRUE if this is a global object class */
     63    NULL                        /* Proxy extraction support callout */
     64#endif
    6065  );
    6166  _Objects_Initialize_information(
    6267    &_POSIX_Message_queue_Information_fds,
     68    OBJECTS_POSIX_API,
    6369    OBJECTS_POSIX_MESSAGE_QUEUE_FDS,
    64     FALSE,
    6570    maximum_message_queues,
    6671    sizeof( POSIX_Message_queue_Control_fd ),
    67     FALSE,
    68     0,
    69     FALSE
     72                                /* size of this object's control block */
     73    FALSE,                      /* TRUE if names for this object are strings */
     74    0                           /* maximum length of each object's name */
     75#if defined(RTEMS_MULTIPROCESSING)
     76    ,
     77    FALSE,                      /* TRUE if this is a global object class */
     78    NULL                        /* Proxy extraction support callout */
     79#endif
    7080  );
    7181}
  • cpukit/posix/src/mqueuecreatesupp.c

    r90015e7f r3c465878  
    112112  if ( ! _CORE_message_queue_Initialize(
    113113           &the_mq->Message_queue,
    114            OBJECTS_POSIX_MESSAGE_QUEUES,
    115114           the_mq_attr,
    116115           attr.mq_maxmsg,
    117            attr.mq_msgsize,
    118 #if 0 && defined(RTEMS_MULTIPROCESSING)
    119            _POSIX_Message_queue_MP_Send_extract_proxy
    120 #else
    121            NULL
    122 #endif
     116           attr.mq_msgsize
    123117      ) ) {
    124118
  • cpukit/posix/src/mutex.c

    r90015e7f r3c465878  
    3838{
    3939  _Objects_Initialize_information(
    40     &_POSIX_Mutex_Information,
    41     OBJECTS_POSIX_MUTEXES,
    42     TRUE,
    43     maximum_mutexes,
     40    &_POSIX_Mutex_Information,  /* object information table */
     41    OBJECTS_POSIX_API,          /* object API */
     42    OBJECTS_POSIX_MUTEXES,      /* object class */
     43    maximum_mutexes,            /* maximum objects of this class */
    4444    sizeof( POSIX_Mutex_Control ),
    45     FALSE,
    46     0,
    47     FALSE
     45                                /* size of this object's control block */
     46    FALSE,                      /* TRUE if names for this object are strings */
     47    0                           /* maximum length of each object's name */
     48#if defined(RTEMS_MULTIPROCESSING)
     49    ,
     50    FALSE,                      /* TRUE if this is a global object class */
     51    NULL                        /* Proxy extraction support callout */
     52#endif
    4853  );
    4954}
  • cpukit/posix/src/mutexinit.c

    r90015e7f r3c465878  
    164164  _CORE_mutex_Initialize(
    165165    &the_mutex->Mutex,
    166     OBJECTS_POSIX_MUTEXES,
    167166    the_mutex_attr,
    168     CORE_MUTEX_UNLOCKED,
    169     NULL                      /* proxy_extract_callout */
     167    CORE_MUTEX_UNLOCKED
    170168  );
    171169
  • cpukit/posix/src/psignal.c

    r90015e7f r3c465878  
    226226  _Thread_queue_Initialize(
    227227    &_POSIX_signals_Wait_queue,
    228     OBJECTS_NO_CLASS,
    229228    THREAD_QUEUE_DISCIPLINE_PRIORITY,
    230229    STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
    231     NULL,
    232230    EAGAIN
    233231  );
  • cpukit/posix/src/pthread.c

    r90015e7f r3c465878  
    168168  /* XXX use signal constants */
    169169  api->signals_pending = 0;
    170   if ( _Objects_Get_class( created->Object.id ) == OBJECTS_POSIX_THREADS ) {
     170  if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
     171       _Objects_Get_class( created->Object.id ) == 1 ) {
    171172    executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
    172173    api->signals_blocked = api->signals_blocked;
     
    174175    api->signals_blocked = 0xffffffff;
    175176
    176 /* XXX set signal parameters -- block all signals for non-posix threads */
    177 
    178177  _Thread_queue_Initialize(
    179178    &api->Join_List,
    180     OBJECTS_NO_CLASS,                 /* only used for proxy operations */
    181179    THREAD_QUEUE_DISCIPLINE_FIFO,
    182180    STATES_WAITING_FOR_JOIN_AT_EXIT,
    183     NULL,                             /* no extract proxy handler */
    184181    0
    185182  );
     
    357354
    358355  _Objects_Initialize_information(
    359     &_POSIX_Threads_Information,
    360     OBJECTS_POSIX_THREADS,
    361     FALSE,                               /* does not support global */
    362     maximum_pthreads,
     356    &_POSIX_Threads_Information, /* object information table */
     357    OBJECTS_POSIX_API,           /* object API */
     358    OBJECTS_POSIX_THREADS,       /* object class */
     359    maximum_pthreads,            /* maximum objects of this class */
    363360    sizeof( Thread_Control ),
    364     FALSE,
    365     0,                                   /* length is arbitrary for now */
    366     TRUE                                 /* this class is threads */
     361                                 /* size of this object's control block */
     362    FALSE,                       /* TRUE if names for this object are strings */
     363    0                            /* maximum length of each object's name */
     364#if defined(RTEMS_MULTIPROCESSING)
     365    ,
     366    FALSE,                       /* TRUE if this is a global object class */
     367    NULL                         /* Proxy extraction support callout */
     368#endif
    367369  );
    368370
  • cpukit/posix/src/semaphore.c

    r90015e7f r3c465878  
    3838{
    3939  _Objects_Initialize_information(
    40     &_POSIX_Semaphore_Information,
    41     OBJECTS_POSIX_SEMAPHORES,
    42     TRUE,
    43     maximum_semaphores,
     40    &_POSIX_Semaphore_Information, /* object information table */
     41    OBJECTS_POSIX_API,             /* object API */
     42    OBJECTS_POSIX_SEMAPHORES,      /* object class */
     43    maximum_semaphores             /* maximum objects of this class */,
    4444    sizeof( POSIX_Semaphore_Control ),
    45     TRUE,
    46     _POSIX_PATH_MAX,
    47     FALSE
     45                                /* size of this object's control block */
     46    FALSE,                      /* TRUE if names for this object are strings */
     47    _POSIX_PATH_MAX             /* maximum length of each object's name */
     48#if defined(RTEMS_MULTIPROCESSING)
     49    ,
     50    FALSE,                      /* TRUE if this is a global object class */
     51    NULL                        /* Proxy extraction support callout */
     52#endif
    4853  );
    4954}
  • cpukit/posix/src/semaphorecreatesupp.c

    r90015e7f r3c465878  
    101101  the_sem_attr->maximum_count = 0xFFFFFFFF;
    102102
    103   _CORE_semaphore_Initialize(
    104     &the_semaphore->Semaphore,
    105     OBJECTS_POSIX_SEMAPHORES,
    106     the_sem_attr,
    107     value,
    108     NULL                 /* multiprocessing is not supported */
    109   );
     103  _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
    110104
    111105  /*
Note: See TracChangeset for help on using the changeset viewer.