summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/shm.c')
-rw-r--r--cpukit/posix/src/shm.c66
1 files changed, 34 insertions, 32 deletions
diff --git a/cpukit/posix/src/shm.c b/cpukit/posix/src/shm.c
index 5030a9376e..8ab14f4e0f 100644
--- a/cpukit/posix/src/shm.c
+++ b/cpukit/posix/src/shm.c
@@ -1,47 +1,49 @@
/**
* @file
+ *
+ * @ingroup POSIXShmPrivate
+ *
+ * @brief POSIX Shared Memory Information with Zero Objects
*/
/*
- * Copyright (c) 2016 Gedare Bloom.
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/libio.h>
-#include <rtems/sysinit.h>
-#include <rtems/posix/shmimpl.h>
+#include <rtems/posix/shm.h>
-Objects_Information _POSIX_Shm_Information;
-
-static void _POSIX_Shm_Manager_initialization( void )
-{
- _Objects_Initialize_information(
- &_POSIX_Shm_Information, /* object information table */
- OBJECTS_POSIX_API, /* object API */
- OBJECTS_POSIX_SHMS, /* object class */
- _Configuration_POSIX_Maximum_shms,
- sizeof( POSIX_Shm_Control ),
- /* size of this object's control block */
- _POSIX_PATH_MAX, /* maximum length of each object's name */
- NULL /* Proxy extraction support callout */
- );
-}
+#include <limits.h>
-RTEMS_SYSINIT_ITEM(
- _POSIX_Shm_Manager_initialization,
- RTEMS_SYSINIT_POSIX_SHM,
- RTEMS_SYSINIT_ORDER_MIDDLE
+OBJECTS_INFORMATION_DEFINE_ZERO(
+ _POSIX_Shm,
+ OBJECTS_POSIX_API,
+ OBJECTS_POSIX_SHMS,
+ _POSIX_PATH_MAX
);