Changeset 2189b3e in rtems


Ignore:
Timestamp:
Dec 14, 2015, 3:34:50 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
6c678557
Parents:
3015ed64
git-author:
Sebastian Huber <sebastian.huber@…> (12/14/15 15:34:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:55)
Message:

Optional POSIX Semaphore initialization

Update #2408.

Files:
5 edited

Legend:

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

    r3015ed64 r2189b3e  
    3434 *  this class of objects.
    3535 */
    36 POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information;
     36extern Objects_Information _POSIX_Semaphore_Information;
    3737
    3838/**
     
    4141extern const int
    4242  _POSIX_Semaphore_Return_codes[CORE_SEMAPHORE_STATUS_LAST + 1];
    43 
    44 /**
    45  *  @brief POSIX Semaphore Manager Initialization
    46  *
    47  *  This routine performs the initialization necessary for this manager.
    48  */
    49 void _POSIX_Semaphore_Manager_initialization(void);
    5043
    5144RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *
  • cpukit/posix/src/semaphore.c

    r3015ed64 r2189b3e  
    2929#include <rtems/system.h>
    3030#include <rtems/config.h>
     31#include <rtems/sysinit.h>
    3132#include <rtems/posix/semaphoreimpl.h>
    3233#include <rtems/seterr.h>
     34
     35Objects_Information _POSIX_Semaphore_Information;
    3336
    3437/*
     
    4245 */
    4346
    44 void _POSIX_Semaphore_Manager_initialization(void)
     47static void _POSIX_Semaphore_Manager_initialization(void)
    4548{
    4649  _Objects_Initialize_information(
     
    6164  );
    6265}
     66
     67RTEMS_SYSINIT_ITEM(
     68  _POSIX_Semaphore_Manager_initialization,
     69  RTEMS_SYSINIT_POSIX_SEMAPHORE,
     70  RTEMS_SYSINIT_ORDER_MIDDLE
     71);
  • cpukit/sapi/src/posixapi.c

    r3015ed64 r2189b3e  
    3838#include <rtems/posix/rwlockimpl.h>
    3939#include <rtems/posix/timerimpl.h>
    40 #include <rtems/posix/semaphoreimpl.h>
    4140#include <rtems/posix/spinlockimpl.h>
    4241#endif
     
    6160
    6261  #ifdef RTEMS_POSIX_API
    63     _POSIX_Semaphore_Manager_initialization();
    6462    _POSIX_Timer_Manager_initialization();
    6563    _POSIX_Barrier_Manager_initialization();
  • cpukit/score/include/rtems/sysinit.h

    r3015ed64 r2189b3e  
    4848#define RTEMS_SYSINIT_POSIX_MUTEX                000363
    4949#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE        000364
     50#define RTEMS_SYSINIT_POSIX_SEMAPHORE            000365
    5051#define RTEMS_SYSINIT_POSIX_CLEANUP              00036a
    5152#define RTEMS_SYSINIT_IDLE_THREADS               000380
  • testsuites/sptests/spsysinit01/init.c

    r3015ed64 r2189b3e  
    3434#include <rtems/posix/psignalimpl.h>
    3535#include <rtems/posix/pthreadimpl.h>
     36#include <rtems/posix/semaphoreimpl.h>
    3637#endif /* RTEMS_POSIX_API */
    3738#include <rtems/rtems/barrierimpl.h>
     
    9697  POSIX_MESSAGE_QUEUE_PRE,
    9798  POSIX_MESSAGE_QUEUE_POST,
     99  POSIX_SEMAPHORE_PRE,
     100  POSIX_SEMAPHORE_POST,
    98101  POSIX_CLEANUP_PRE,
    99102  POSIX_CLEANUP_POST,
     
    408411}
    409412
     413FIRST(RTEMS_SYSINIT_POSIX_SEMAPHORE)
     414{
     415  assert(_POSIX_Semaphore_Information.maximum == 0);
     416  next_step(POSIX_SEMAPHORE_PRE);
     417}
     418
     419LAST(RTEMS_SYSINIT_POSIX_SEMAPHORE)
     420{
     421  assert(_POSIX_Semaphore_Information.maximum != 0);
     422  next_step(POSIX_SEMAPHORE_POST);
     423}
     424
    410425static size_t user_extensions_pre_posix_cleanup;
    411426
     
    543558#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
    544559
     560#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
     561
    545562#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
    546563
Note: See TracChangeset for help on using the changeset viewer.