Changeset 76a8328 in rtems


Ignore:
Timestamp:
Dec 14, 2015, 3:39:10 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
4eee8781
Parents:
e4e7f14
git-author:
Sebastian Huber <sebastian.huber@…> (12/14/15 15:39:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:56)
Message:

Optional POSIX RWLock initialization

Update #2408.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/include/rtems/posix/rwlockimpl.h

    re4e7f14 r76a8328  
    3535 */
    3636
    37 POSIX_EXTERN Objects_Information  _POSIX_RWLock_Information;
    38 
    39 /**
    40  * @brief POSIX RWLock manager initialization.
    41  *
    42  * This routine performs the initialization necessary for this manager.
    43  */
    44 
    45 void _POSIX_RWLock_Manager_initialization(void);
     37extern Objects_Information _POSIX_RWLock_Information;
    4638
    4739/**
  • cpukit/posix/src/prwlock.c

    re4e7f14 r76a8328  
    1818#include <rtems/system.h>
    1919#include <rtems/config.h>
     20#include <rtems/sysinit.h>
    2021#include <rtems/posix/rwlockimpl.h>
     22
     23Objects_Information _POSIX_RWLock_Information;
    2124
    2225/**
     
    2427 */
    2528
    26 void _POSIX_RWLock_Manager_initialization(void)
     29static void _POSIX_RWLock_Manager_initialization(void)
    2730{
    2831  _Objects_Initialize_information(
     
    4245  );
    4346}
     47
     48RTEMS_SYSINIT_ITEM(
     49  _POSIX_RWLock_Manager_initialization,
     50  RTEMS_SYSINIT_POSIX_RWLOCK,
     51  RTEMS_SYSINIT_ORDER_MIDDLE
     52);
  • cpukit/sapi/src/posixapi.c

    re4e7f14 r76a8328  
    3535#include <rtems/posix/priorityimpl.h>
    3636#include <rtems/posix/psignalimpl.h>
    37 #include <rtems/posix/rwlockimpl.h>
    3837#include <rtems/posix/spinlockimpl.h>
    3938#endif
     
    5857
    5958  #ifdef RTEMS_POSIX_API
    60     _POSIX_RWLock_Manager_initialization();
    6159    _POSIX_Spinlock_Manager_initialization();
    6260  #endif
  • cpukit/score/include/rtems/sysinit.h

    re4e7f14 r76a8328  
    5151#define RTEMS_SYSINIT_POSIX_TIMER                000366
    5252#define RTEMS_SYSINIT_POSIX_BARRIER              000367
     53#define RTEMS_SYSINIT_POSIX_RWLOCK               000368
    5354#define RTEMS_SYSINIT_POSIX_CLEANUP              00036a
    5455#define RTEMS_SYSINIT_IDLE_THREADS               000380
  • testsuites/sptests/spsysinit01/init.c

    re4e7f14 r76a8328  
    3535#include <rtems/posix/psignalimpl.h>
    3636#include <rtems/posix/pthreadimpl.h>
     37#include <rtems/posix/rwlockimpl.h>
    3738#include <rtems/posix/semaphoreimpl.h>
    3839#include <rtems/posix/timerimpl.h>
     
    105106  POSIX_BARRIER_PRE,
    106107  POSIX_BARRIER_POST,
     108  POSIX_RWLOCK_PRE,
     109  POSIX_RWLOCK_POST,
    107110  POSIX_CLEANUP_PRE,
    108111  POSIX_CLEANUP_POST,
     
    453456}
    454457
     458FIRST(RTEMS_SYSINIT_POSIX_RWLOCK)
     459{
     460  assert(_POSIX_RWLock_Information.maximum == 0);
     461  next_step(POSIX_RWLOCK_PRE);
     462}
     463
     464LAST(RTEMS_SYSINIT_POSIX_RWLOCK)
     465{
     466  assert(_POSIX_RWLock_Information.maximum != 0);
     467  next_step(POSIX_RWLOCK_POST);
     468}
     469
    455470static size_t user_extensions_pre_posix_cleanup;
    456471
     
    590605#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
    591606
     607#define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 1
     608
    592609#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
    593610
Note: See TracChangeset for help on using the changeset viewer.