Changeset 4eee8781 in rtems


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

Optional POSIX Spinlock initialization

Update #2408.

Files:
5 edited

Legend:

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

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

    r76a8328 r4eee8781  
    2222#include <rtems/system.h>
    2323#include <rtems/config.h>
     24#include <rtems/sysinit.h>
    2425#include <rtems/posix/spinlockimpl.h>
     26
     27Objects_Information _POSIX_Spinlock_Information;
    2528
    2629/**
    2730 *  @brief _POSIX_Spinlock_Manager_initialization
    2831 */
    29 void _POSIX_Spinlock_Manager_initialization(void)
     32static void _POSIX_Spinlock_Manager_initialization(void)
    3033{
    3134  _Objects_Initialize_information(
     
    4548  );
    4649}
     50
     51RTEMS_SYSINIT_ITEM(
     52  _POSIX_Spinlock_Manager_initialization,
     53  RTEMS_SYSINIT_POSIX_SPINLOCK,
     54  RTEMS_SYSINIT_ORDER_MIDDLE
     55);
  • cpukit/sapi/src/posixapi.c

    r76a8328 r4eee8781  
    3535#include <rtems/posix/priorityimpl.h>
    3636#include <rtems/posix/psignalimpl.h>
    37 #include <rtems/posix/spinlockimpl.h>
    3837#endif
    3938
     
    5554
    5655  _POSIX_Key_Manager_initialization();
    57 
    58   #ifdef RTEMS_POSIX_API
    59     _POSIX_Spinlock_Manager_initialization();
    60   #endif
    6156}
  • cpukit/score/include/rtems/sysinit.h

    r76a8328 r4eee8781  
    5252#define RTEMS_SYSINIT_POSIX_BARRIER              000367
    5353#define RTEMS_SYSINIT_POSIX_RWLOCK               000368
     54#define RTEMS_SYSINIT_POSIX_SPINLOCK             000369
    5455#define RTEMS_SYSINIT_POSIX_CLEANUP              00036a
    5556#define RTEMS_SYSINIT_IDLE_THREADS               000380
  • testsuites/sptests/spsysinit01/init.c

    r76a8328 r4eee8781  
    3737#include <rtems/posix/rwlockimpl.h>
    3838#include <rtems/posix/semaphoreimpl.h>
     39#include <rtems/posix/spinlockimpl.h>
    3940#include <rtems/posix/timerimpl.h>
    4041#endif /* RTEMS_POSIX_API */
     
    108109  POSIX_RWLOCK_PRE,
    109110  POSIX_RWLOCK_POST,
     111  POSIX_SPINLOCK_PRE,
     112  POSIX_SPINLOCK_POST,
    110113  POSIX_CLEANUP_PRE,
    111114  POSIX_CLEANUP_POST,
     
    468471}
    469472
     473FIRST(RTEMS_SYSINIT_POSIX_SPINLOCK)
     474{
     475  assert(_POSIX_Spinlock_Information.maximum == 0);
     476  next_step(POSIX_SPINLOCK_PRE);
     477}
     478
     479LAST(RTEMS_SYSINIT_POSIX_SPINLOCK)
     480{
     481  assert(_POSIX_Spinlock_Information.maximum != 0);
     482  next_step(POSIX_SPINLOCK_POST);
     483}
     484
    470485static size_t user_extensions_pre_posix_cleanup;
    471486
     
    609624#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
    610625
     626#define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS 1
     627
    611628#define CONFIGURE_MAXIMUM_POSIX_TIMERS 1
    612629
Note: See TracChangeset for help on using the changeset viewer.