RTEMS 6.1-rc6
Loading...
Searching...
No Matches
mmanimpl.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
10/*
11 * Copyright (c) 2012 Chris Johns
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#ifndef _RTEMS_POSIX_MMANIMPL_H
36#define _RTEMS_POSIX_MMANIMPL_H
37
38#include <rtems/libio_.h>
39#include <rtems/chain.h> /* FIXME: use score chains for proper layering? */
40#include <rtems/posix/shm.h>
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46/* FIXME: add Doxygen */
47
51typedef struct mmap_mappings_s {
53 void* addr;
54 size_t len;
55 int flags;
58
59extern rtems_chain_control mmap_mappings;
60
61static inline void mmap_mappings_lock_obtain( void )
62{
63 rtems_libio_lock();
64}
65
66static inline void mmap_mappings_lock_release( void )
67{
68 rtems_libio_unlock();
69}
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif
This header file provides the Chains API.
LibIO Internal Interface.
struct mmap_mappings_s mmap_mapping
Internal Support for POSIX Shared Memory.
This structure represents a chain node.
Definition: chain.h:78
Control for a POSIX Shared Memory Object.
Definition: shm.h:130
Definition: mmanimpl.h:51
void * addr
Definition: mmanimpl.h:53
size_t len
Definition: mmanimpl.h:54
POSIX_Shm_Control * shm
Definition: mmanimpl.h:56
rtems_chain_node node
Definition: mmanimpl.h:52
int flags
Definition: mmanimpl.h:55
This union represents a chain control block.
Definition: chain.h:96