Changeset 6c678557 in rtems


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

Optional POSIX Timer initialization

Update #2408.

Files:
6 edited

Legend:

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

    r2189b3e r6c678557  
    3535
    3636#include <rtems/posix/config.h>
    37 
    38 /**
    39  *  @brief POSIX Timer Manager Initialization
    40  *
    41  *  This routine performs the initialization necessary for this manager.
    42  */
    43 void _POSIX_Timer_Manager_initialization(void);
    4437
    4538/**
  • cpukit/posix/include/rtems/posix/timerimpl.h

    r2189b3e r6c678557  
    5252
    5353/**
    54  *  @brief POSIX Timer Manager Initialization
    55  *
    56  *  This routine performs the initialization necessary for this manager.
    57  */
    58 void _POSIX_Timer_Manager_initialization(void);
    59 
    60 /**
    6154 *  @brief POSIX Timer Manager Timer Service Routine Helper
    6255 *
     
    8073 *  this class of objects.
    8174 */
    82 POSIX_EXTERN Objects_Information _POSIX_Timer_Information;
     75extern Objects_Information _POSIX_Timer_Information;
    8376
    8477/**
  • cpukit/posix/src/ptimer.c

    r2189b3e r6c678557  
    3434
    3535#include <unistd.h>
     36#include <rtems/sysinit.h>
    3637#include <rtems/rtems/status.h>
    3738#include <rtems/rtems/types.h>
     
    4546#include <rtems/posix/timerimpl.h>
    4647
     48Objects_Information _POSIX_Timer_Information;
     49
    4750/*
    4851 * _POSIX_Timer_Manager_initialization
     
    5457 */
    5558
    56 void _POSIX_Timer_Manager_initialization(void)
     59static void _POSIX_Timer_Manager_initialization(void)
    5760{
    5861  _Objects_Initialize_information(
     
    7376  );
    7477}
     78
     79RTEMS_SYSINIT_ITEM(
     80  _POSIX_Timer_Manager_initialization,
     81  RTEMS_SYSINIT_POSIX_TIMER,
     82  RTEMS_SYSINIT_ORDER_MIDDLE
     83);
  • cpukit/sapi/src/posixapi.c

    r2189b3e r6c678557  
    3737#include <rtems/posix/psignalimpl.h>
    3838#include <rtems/posix/rwlockimpl.h>
    39 #include <rtems/posix/timerimpl.h>
    4039#include <rtems/posix/spinlockimpl.h>
    4140#endif
     
    6059
    6160  #ifdef RTEMS_POSIX_API
    62     _POSIX_Timer_Manager_initialization();
    6361    _POSIX_Barrier_Manager_initialization();
    6462    _POSIX_RWLock_Manager_initialization();
  • cpukit/score/include/rtems/sysinit.h

    r2189b3e r6c678557  
    4949#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE        000364
    5050#define RTEMS_SYSINIT_POSIX_SEMAPHORE            000365
     51#define RTEMS_SYSINIT_POSIX_TIMER                000366
    5152#define RTEMS_SYSINIT_POSIX_CLEANUP              00036a
    5253#define RTEMS_SYSINIT_IDLE_THREADS               000380
  • testsuites/sptests/spsysinit01/init.c

    r2189b3e r6c678557  
    3535#include <rtems/posix/pthreadimpl.h>
    3636#include <rtems/posix/semaphoreimpl.h>
     37#include <rtems/posix/timerimpl.h>
    3738#endif /* RTEMS_POSIX_API */
    3839#include <rtems/rtems/barrierimpl.h>
     
    99100  POSIX_SEMAPHORE_PRE,
    100101  POSIX_SEMAPHORE_POST,
     102  POSIX_TIMER_PRE,
     103  POSIX_TIMER_POST,
    101104  POSIX_CLEANUP_PRE,
    102105  POSIX_CLEANUP_POST,
     
    423426}
    424427
     428FIRST(RTEMS_SYSINIT_POSIX_TIMER)
     429{
     430  assert(_POSIX_Timer_Information.maximum == 0);
     431  next_step(POSIX_TIMER_PRE);
     432}
     433
     434LAST(RTEMS_SYSINIT_POSIX_TIMER)
     435{
     436  assert(_POSIX_Timer_Information.maximum != 0);
     437  next_step(POSIX_TIMER_POST);
     438}
     439
    425440static size_t user_extensions_pre_posix_cleanup;
    426441
     
    560575#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
    561576
     577#define CONFIGURE_MAXIMUM_POSIX_TIMERS 1
     578
    562579#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
    563580
Note: See TracChangeset for help on using the changeset viewer.