Changeset 3015ed64 in rtems


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

Optional POSIX Message Queue initialization

Update #2408.

Files:
5 edited

Legend:

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

    r9871f5dc r3015ed64  
    3232 *  this class of objects.
    3333 */
    34 POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information;
     34extern Objects_Information _POSIX_Message_queue_Information;
    3535
    3636/**
     
    3838 *  the message queues.
    3939 */
    40 POSIX_EXTERN Objects_Information  _POSIX_Message_queue_Information_fds;
    41 
    42 /**
    43  * @brief Initialize message_queue manager related data structures.
    44  *
    45  * This routine performs the initialization necessary for this manager.
    46  *
    47  * @note The structure of the routines is identical to that of POSIX
    48  *       Message_queues to leave the option of having unnamed message
    49  *       queues at a future date.  They are currently not part of the
    50  *       POSIX standard but unnamed message_queues are.  This is also
    51  *       the reason for the apparently unnecessary tracking of
    52  *       the process_shared attribute.  [In addition to the fact that
    53  *       it would be trivial to add pshared to the mq_attr structure
    54  *       and have process private message queues.]
    55  *
    56  * @note This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open time.
    57  *
    58  */
    59 void _POSIX_Message_queue_Manager_initialization(void);
     40extern Objects_Information _POSIX_Message_queue_Information_fds;
    6041
    6142/**
  • cpukit/posix/src/mqueue.c

    r9871f5dc r3015ed64  
    2929#include <rtems/system.h>
    3030#include <rtems/config.h>
     31#include <rtems/sysinit.h>
    3132#include <rtems/score/watchdog.h>
    3233#include <rtems/seterr.h>
    3334#include <rtems/posix/mqueueimpl.h>
     35
     36Objects_Information _POSIX_Message_queue_Information;
     37
     38Objects_Information _POSIX_Message_queue_Information_fds;
    3439
    3540/*
     
    4348 */
    4449
    45 void _POSIX_Message_queue_Manager_initialization(void)
     50static void _POSIX_Message_queue_Manager_initialization(void)
    4651{
    4752  _Objects_Initialize_information(
     
    7782  );
    7883}
     84
     85RTEMS_SYSINIT_ITEM(
     86  _POSIX_Message_queue_Manager_initialization,
     87  RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE,
     88  RTEMS_SYSINIT_ORDER_MIDDLE
     89);
  • cpukit/sapi/src/posixapi.c

    r9871f5dc r3015ed64  
    3434#include <rtems/posix/barrierimpl.h>
    3535#include <rtems/posix/config.h>
    36 #include <rtems/posix/mqueueimpl.h>
    3736#include <rtems/posix/priorityimpl.h>
    3837#include <rtems/posix/psignalimpl.h>
     
    6261
    6362  #ifdef RTEMS_POSIX_API
    64     _POSIX_Message_queue_Manager_initialization();
    6563    _POSIX_Semaphore_Manager_initialization();
    6664    _POSIX_Timer_Manager_initialization();
  • cpukit/score/include/rtems/sysinit.h

    r9871f5dc r3015ed64  
    4747#define RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE   000362
    4848#define RTEMS_SYSINIT_POSIX_MUTEX                000363
     49#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE        000364
    4950#define RTEMS_SYSINIT_POSIX_CLEANUP              00036a
    5051#define RTEMS_SYSINIT_IDLE_THREADS               000380
  • testsuites/sptests/spsysinit01/init.c

    r9871f5dc r3015ed64  
    3030#ifdef RTEMS_POSIX_API
    3131#include <rtems/posix/condimpl.h>
     32#include <rtems/posix/mqueueimpl.h>
    3233#include <rtems/posix/muteximpl.h>
    3334#include <rtems/posix/psignalimpl.h>
     
    9394  POSIX_MUTEX_PRE,
    9495  POSIX_MUTEX_POST,
     96  POSIX_MESSAGE_QUEUE_PRE,
     97  POSIX_MESSAGE_QUEUE_POST,
    9598  POSIX_CLEANUP_PRE,
    9699  POSIX_CLEANUP_POST,
     
    393396}
    394397
     398FIRST(RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE)
     399{
     400  assert(_POSIX_Message_queue_Information.maximum == 0);
     401  next_step(POSIX_MESSAGE_QUEUE_PRE);
     402}
     403
     404LAST(RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE)
     405{
     406  assert(_POSIX_Message_queue_Information.maximum != 0);
     407  next_step(POSIX_MESSAGE_QUEUE_POST);
     408}
     409
    395410static size_t user_extensions_pre_posix_cleanup;
    396411
     
    522537#ifdef RTEMS_POSIX_API
    523538
     539#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1
     540
    524541#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
    525542
Note: See TracChangeset for help on using the changeset viewer.