Changeset 701057e0 in rtems for cpukit


Ignore:
Timestamp:
Oct 25, 2018, 8:07:46 AM (12 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
fe7aefd5
Parents:
9318cfb0
git-author:
Sebastian Huber <sebastian.huber@…> (10/25/18 08:07:46)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/29/18 09:33:37)
Message:

posix: Provide shared memory objects by default

Update #2514.

Location:
cpukit
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    r9318cfb0 r701057e0  
    509509librtemscpu_a_SOURCES += posix/src/mlockall.c
    510510librtemscpu_a_SOURCES += posix/src/mlock.c
     511librtemscpu_a_SOURCES += posix/src/mmap.c
    511512librtemscpu_a_SOURCES += posix/src/mprotect.c
    512513librtemscpu_a_SOURCES += posix/src/mqueueconfig.c
     
    514515librtemscpu_a_SOURCES += posix/src/munlockall.c
    515516librtemscpu_a_SOURCES += posix/src/munlock.c
     517librtemscpu_a_SOURCES += posix/src/munmap.c
    516518librtemscpu_a_SOURCES += posix/src/mutexattrdestroy.c
    517519librtemscpu_a_SOURCES += posix/src/mutexattrgetprioceiling.c
     
    621623librtemscpu_a_SOURCES += posix/src/setcancelstate.c
    622624librtemscpu_a_SOURCES += posix/src/setcanceltype.c
     625librtemscpu_a_SOURCES += posix/src/shm.c
    623626librtemscpu_a_SOURCES += posix/src/shmconfig.c
     627librtemscpu_a_SOURCES += posix/src/shmheap.c
     628librtemscpu_a_SOURCES += posix/src/shmopen.c
     629librtemscpu_a_SOURCES += posix/src/shmops.c
     630librtemscpu_a_SOURCES += posix/src/shmunlink.c
     631librtemscpu_a_SOURCES += posix/src/shmwkspace.c
    624632librtemscpu_a_SOURCES += posix/src/sigaddset.c
    625633librtemscpu_a_SOURCES += posix/src/sigdelset.c
     
    10401048librtemscpu_a_SOURCES += posix/src/killinfo.c
    10411049librtemscpu_a_SOURCES += posix/src/kill_r.c
    1042 librtemscpu_a_SOURCES += posix/src/mmap.c
    10431050librtemscpu_a_SOURCES += posix/src/mqueue.c
    10441051librtemscpu_a_SOURCES += posix/src/mqueueclose.c
     
    10551062librtemscpu_a_SOURCES += posix/src/mqueuetimedsend.c
    10561063librtemscpu_a_SOURCES += posix/src/mqueueunlink.c
    1057 librtemscpu_a_SOURCES += posix/src/munmap.c
    10581064librtemscpu_a_SOURCES += posix/src/pause.c
    10591065librtemscpu_a_SOURCES += posix/src/psignal.c
     
    10751081librtemscpu_a_SOURCES += posix/src/ptimer.c
    10761082librtemscpu_a_SOURCES += posix/src/setitimer.c
    1077 librtemscpu_a_SOURCES += posix/src/shm.c
    1078 librtemscpu_a_SOURCES += posix/src/shmheap.c
    1079 librtemscpu_a_SOURCES += posix/src/shmopen.c
    1080 librtemscpu_a_SOURCES += posix/src/shmunlink.c
    1081 librtemscpu_a_SOURCES += posix/src/shmwkspace.c
    10821083librtemscpu_a_SOURCES += posix/src/sigaction.c
    10831084librtemscpu_a_SOURCES += posix/src/signal_2.c
  • cpukit/include/rtems/confdefs.h

    r9318cfb0 r701057e0  
    3535#include <rtems/posix/key.h>
    3636#include <rtems/posix/semaphore.h>
     37#include <rtems/posix/shm.h>
    3738
    3839#include <limits.h>
     
    19411942      rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
    19421943  #endif
     1944  #if !defined(CONFIGURE_MAXIMUM_POSIX_SHMS)
     1945    #define CONFIGURE_MAXIMUM_POSIX_SHMS \
     1946      rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
     1947  #endif
    19431948
    19441949  #ifdef RTEMS_POSIX_API
     
    19591964    #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
    19601965      #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES \
    1961         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
    1962     #endif
    1963     #if !defined(CONFIGURE_MAXIMUM_POSIX_SHMS)
    1964       #define CONFIGURE_MAXIMUM_POSIX_SHMS \
    19651966        rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
    19661967    #endif
     
    23242325     _semaphores, sizeof(POSIX_Semaphore_Control) )
    23252326
     2327/**
     2328 * Configure the maximum number of POSIX shared memory objects.
     2329 */
     2330#ifndef CONFIGURE_MAXIMUM_POSIX_SHMS
     2331  #define CONFIGURE_MAXIMUM_POSIX_SHMS 0
     2332#endif
     2333
     2334/*
     2335 * This macro is calculated to specify the memory required for
     2336 * POSIX API shared memory.
     2337 */
     2338#define _CONFIGURE_MEMORY_FOR_POSIX_SHMS(_shms) \
     2339  _Configure_POSIX_Named_Object_RAM(_shms, sizeof(POSIX_Shm_Control) )
     2340
    23262341/*
    23272342 *  The rest of the POSIX threads API features are only available when
     
    23352350  #include <rtems/posix/psignal.h>
    23362351  #include <rtems/posix/pthread.h>
    2337   #include <rtems/posix/shm.h>
    23382352  #include <rtems/posix/threadsup.h>
    23392353  #include <rtems/posix/timer.h>
     
    23932407    _Configure_POSIX_Named_Object_RAM( \
    23942408       _message_queues, sizeof(POSIX_Message_queue_Control) )
    2395 
    2396   /**
    2397    * Configure the maximum number of POSIX shared memory objects.
    2398    */
    2399   #if !defined(CONFIGURE_MAXIMUM_POSIX_SHMS)
    2400     #define CONFIGURE_MAXIMUM_POSIX_SHMS 0
    2401   #else
    2402     #ifdef CONFIGURE_INIT
    2403       #if !defined(CONFIGURE_HAS_OWN_POSIX_SHM_OBJECT_OPERATIONS)
    2404         const POSIX_Shm_Object_operations _POSIX_Shm_Object_operations = {
    2405           _POSIX_Shm_Object_create_from_workspace,
    2406           _POSIX_Shm_Object_resize_from_workspace,
    2407           _POSIX_Shm_Object_delete_from_workspace,
    2408           _POSIX_Shm_Object_read_from_workspace,
    2409           _POSIX_Shm_Object_mmap_from_workspace
    2410         };
    2411       #endif
    2412     #endif
    2413   #endif
    2414 
    2415   /*
    2416    * This macro is calculated to specify the memory required for
    2417    * POSIX API shared memory.
    2418    */
    2419   #define _CONFIGURE_MEMORY_FOR_POSIX_SHMS(_shms) \
    2420     _Configure_POSIX_Named_Object_RAM(_shms, sizeof(POSIX_Shm_Control) )
    24212409
    24222410  #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
     
    25602548      _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
    25612549        CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) + \
    2562       _CONFIGURE_MEMORY_FOR_POSIX_SHMS( \
    2563         CONFIGURE_MAXIMUM_POSIX_SHMS) + \
    25642550      _CONFIGURE_MEMORY_FOR_POSIX_TIMERS(CONFIGURE_MAXIMUM_POSIX_TIMERS))
    25652551#else
     
    27222708   _CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
    27232709     CONFIGURE_MAXIMUM_POSIX_SEMAPHORES) + \
     2710   _CONFIGURE_MEMORY_FOR_POSIX_SHMS( \
     2711     CONFIGURE_MAXIMUM_POSIX_SHMS) + \
    27242712   _CONFIGURE_MEMORY_FOR_POSIX + \
    27252713   _CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \
     
    32273215#endif
    32283216    uint32_t POSIX_SEMAPHORES;
    3229 #ifdef RTEMS_POSIX_API
    32303217    uint32_t POSIX_SHMS;
    3231 #endif
    32323218
    32333219    /* Stack space sizes */
     
    32693255                                     CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS ),
    32703256
     3257    /* POSIX API Pieces */
    32713258#ifdef RTEMS_POSIX_API
    3272     /* POSIX API Pieces */
     3259    _CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
    32733260    _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
    32743261      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
     
    32773264#endif
    32783265    _CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ),
    3279 #ifdef RTEMS_POSIX_API
    32803266    _CONFIGURE_MEMORY_FOR_POSIX_SHMS( CONFIGURE_MAXIMUM_POSIX_SHMS ),
    3281     _CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
    3282 #endif
    32833267
    32843268    /* Stack space sizes */
     
    33453329       (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
    33463330       (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
    3347        (CONFIGURE_MAXIMUM_POSIX_SHMS != 0) || \
    33483331      defined(CONFIGURE_POSIX_INIT_THREAD_TABLE))
    33493332  #error "CONFIGURATION ERROR: POSIX API support not configured!!"
  • cpukit/rtems/src/rtemsobjectgetapiclassname.c

    r9318cfb0 r701057e0  
    5353#ifdef RTEMS_POSIX_API
    5454  { "Timer",                   OBJECTS_POSIX_TIMERS, 0},
     55#endif
    5556  { "Shared Memory",           OBJECTS_POSIX_SHMS, 0},
    56 #endif
    5757  { NULL,                      0, 0}
    5858};
Note: See TracChangeset for help on using the changeset viewer.