source: rtems/cpukit/posix/src/shm.c @ ba776282

5
Last change on this file since ba776282 was ba776282, checked in by Gedare Bloom <gedare@…>, on 08/12/16 at 19:25:10

posix: shared memory support

Add POSIX shared memory manager (Shm). Includes a hook-based
approach for the backing memory storage that defaults to the
Workspace, and a test is provided using the heap. A test is
also provided for the basic use of mmap'ing a shared memory
object. This test currently fails at the mmap stage due to
no support for mmap.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/**
2 * @file
3 */
4
5/*
6 * Copyright (c) 2016 Gedare Bloom.
7 *
8 * The license and distribution terms for this file may be
9 * found in the file LICENSE in this distribution or at
10 * http://www.rtems.org/license/LICENSE.
11 */
12
13#if HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#include <sys/stat.h>
18#include <fcntl.h>
19
20#include <rtems/system.h>
21#include <rtems/config.h>
22#include <rtems/libio.h>
23#include <rtems/sysinit.h>
24#include <rtems/posix/shmimpl.h>
25
26Objects_Information _POSIX_Shm_Information;
27
28static void _POSIX_Shm_Manager_initialization( void )
29{
30  _Objects_Initialize_information(
31    &_POSIX_Shm_Information,    /* object information table */
32    OBJECTS_POSIX_API,          /* object API */
33    OBJECTS_POSIX_SHMS,         /* object class */
34    Configuration_POSIX_API.maximum_shms,
35                                /* maximum objects of this class */
36    sizeof( POSIX_Shm_Control ),
37                                /* size of this object's control block */
38    true,                       /* true if names for this object are strings */
39    _POSIX_PATH_MAX,            /* maximum length of each object's name */
40    NULL                        /* Proxy extraction support callout */
41  );
42}
43
44RTEMS_SYSINIT_ITEM(
45  _POSIX_Shm_Manager_initialization,
46  RTEMS_SYSINIT_POSIX_SHM,
47  RTEMS_SYSINIT_ORDER_MIDDLE
48);
Note: See TracBrowser for help on using the repository browser.