RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
include
rtems
posix
mmanimpl.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
9
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
43
extern
"C"
{
44
#endif
45
46
/* FIXME: add Doxygen */
47
51
typedef
struct
mmap_mappings_s
{
52
rtems_chain_node
node
;
53
void
*
addr
;
54
size_t
len
;
55
int
flags
;
56
POSIX_Shm_Control
*
shm
;
57
}
mmap_mapping
;
58
59
extern
rtems_chain_control mmap_mappings;
60
61
static
inline
void
mmap_mappings_lock_obtain(
void
)
62
{
63
rtems_libio_lock();
64
}
65
66
static
inline
void
mmap_mappings_lock_release(
void
)
67
{
68
rtems_libio_unlock();
69
}
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
#endif
chain.h
This header file provides the Chains API.
libio_.h
LibIO Internal Interface.
mmap_mapping
struct mmap_mappings_s mmap_mapping
shm.h
Internal Support for POSIX Shared Memory.
POSIX_Shm_Control
Control for a POSIX Shared Memory Object.
Definition
shm.h:130
mmap_mappings_s
Definition
mmanimpl.h:51
mmap_mappings_s::addr
void * addr
Definition
mmanimpl.h:53
mmap_mappings_s::len
size_t len
Definition
mmanimpl.h:54
mmap_mappings_s::shm
POSIX_Shm_Control * shm
Definition
mmanimpl.h:56
mmap_mappings_s::node
rtems_chain_node node
Definition
mmanimpl.h:52
mmap_mappings_s::flags
int flags
Definition
mmanimpl.h:55
Generated by
1.18.0