Changeset cbaac1f7 in rtems


Ignore:
Timestamp:
Dec 14, 2015, 2:05:47 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
fd3cc36f
Parents:
ed8b00e6
git-author:
Sebastian Huber <sebastian.huber@…> (12/14/15 14:05:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:53)
Message:

Optional Classic Semaphore initialization

Update #2408.

Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    red8b00e6 rcbaac1f7  
    195195librtems_a_SOURCES += src/semflush.c
    196196librtems_a_SOURCES += src/semtranslatereturncode.c
    197 librtems_a_SOURCES += src/semdata.c
    198197librtems_a_SOURCES += src/semsetpriority.c
    199198
  • cpukit/rtems/include/rtems/rtems/semimpl.h

    red8b00e6 rcbaac1f7  
    2828
    2929/**
    30  * @brief Instantiate Semaphore Data
    31  *
    32  * Semaphore Manager -- Data Instantiation
    33  *
    34  * This constant is defined to extern most of the time when using
    35  * this header file. However by defining it to nothing, the data
    36  * declared in this header file can be instantiated. This is done
    37  * in a single per manager file.
    38  *
    39  */
    40 #ifndef RTEMS_SEM_EXTERN
    41 #define RTEMS_SEM_EXTERN extern
    42 #endif
    43 
    44 /**
    4530 *  The following defines the information control block used to manage
    4631 *  this class of objects.
    4732 */
    48 RTEMS_SEM_EXTERN Objects_Information _Semaphore_Information;
     33extern Objects_Information _Semaphore_Information;
    4934
    5035extern const rtems_status_code
     
    5338extern const rtems_status_code
    5439  _Semaphore_Translate_core_semaphore_return_code_[];
    55 
    56 /**
    57  *  @brief Semaphore Manager Initialization
    58  *
    59  *  This routine performs the initialization necessary for this manager.
    60  */
    61 void _Semaphore_Manager_initialization(void);
    6240
    6341/**
  • cpukit/rtems/src/sem.c

    red8b00e6 rcbaac1f7  
    2121#include <rtems/system.h>
    2222#include <rtems/config.h>
     23#include <rtems/sysinit.h>
    2324#include <rtems/rtems/status.h>
    2425#include <rtems/rtems/support.h>
    2526#include <rtems/rtems/attrimpl.h>
    26 #include <rtems/score/isr.h>
    2727#include <rtems/rtems/options.h>
    2828#include <rtems/rtems/semimpl.h>
    29 #include <rtems/score/coremuteximpl.h>
    30 #include <rtems/score/coresemimpl.h>
    31 #include <rtems/score/thread.h>
    3229
    33 #include <rtems/score/interr.h>
     30Objects_Information _Semaphore_Information;
    3431
    35 void _Semaphore_Manager_initialization(void)
     32static void _Semaphore_Manager_initialization(void)
    3633{
    3734  _Objects_Initialize_information(
     
    6360
    6461}
     62
     63RTEMS_SYSINIT_ITEM(
     64  _Semaphore_Manager_initialization,
     65  RTEMS_SYSINIT_CLASSIC_SEMAPHORE,
     66  RTEMS_SYSINIT_ORDER_MIDDLE
     67);
  • cpukit/sapi/src/rtemsapi.c

    red8b00e6 rcbaac1f7  
    3333#include <rtems/rtems/ratemonimpl.h>
    3434#include <rtems/rtems/regionimpl.h>
    35 #include <rtems/rtems/semimpl.h>
    3635
    3736void _RTEMS_API_Initialize(void)
    3837{
    39   _Semaphore_Manager_initialization();
    4038  _Partition_Manager_initialization();
    4139  _Region_Manager_initialization();
  • cpukit/score/include/rtems/sysinit.h

    red8b00e6 rcbaac1f7  
    3737#define RTEMS_SYSINIT_CLASSIC_EVENT              000343
    3838#define RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE      000344
     39#define RTEMS_SYSINIT_CLASSIC_SEMAPHORE          000345
    3940#define RTEMS_SYSINIT_IDLE_THREADS               000380
    4041#define RTEMS_SYSINIT_BSP_LIBC                   000400
  • testsuites/sptests/spsysinit01/init.c

    red8b00e6 rcbaac1f7  
    2727#include <rtems/extensionimpl.h>
    2828#include <rtems/rtems/messageimpl.h>
     29#include <rtems/rtems/semimpl.h>
    2930#include <rtems/rtems/tasksimpl.h>
    3031#include <rtems/rtems/timerimpl.h>
     
    5758  CLASSIC_MESSAGE_QUEUE_PRE,
    5859  CLASSIC_MESSAGE_QUEUE_POST,
     60  CLASSIC_SEMAPHORE_PRE,
     61  CLASSIC_SEMAPHORE_POST,
    5962  IDLE_THREADS_PRE,
    6063  IDLE_THREADS_POST,
     
    220223}
    221224
     225FIRST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
     226{
     227  assert(_Semaphore_Information.maximum == 0);
     228  next_step(CLASSIC_SEMAPHORE_PRE);
     229}
     230
     231LAST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
     232{
     233  assert(_Semaphore_Information.maximum != 0);
     234  next_step(CLASSIC_SEMAPHORE_POST);
     235}
     236
    222237FIRST(RTEMS_SYSINIT_IDLE_THREADS)
    223238{
     
    307322#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
    308323
     324#define CONFIGURE_MAXIMUM_SEMAPHORES 1
     325
    309326#define CONFIGURE_MAXIMUM_TASKS 1
    310327
Note: See TracChangeset for help on using the changeset viewer.