F´ Flight Software - C/C++ Documentation
NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
g
h
i
m
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
a
b
c
f
h
i
l
m
n
o
p
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
c
t
u
w
Enumerations
b
c
d
e
f
g
h
i
m
o
p
q
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Related Functions
a
b
c
f
g
h
l
p
r
s
t
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Functions
f
i
m
s
u
Variables
_
c
f
i
l
p
t
Typedefs
Enumerations
Enumerator
a
c
d
f
i
m
p
r
s
t
w
Macros
a
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
LocklessQueue.hpp
Go to the documentation of this file.
1
#ifndef _LOCKLESS_QUEUE_H_
2
#define _LOCKLESS_QUEUE_H_
3
4
#include <
Fw/Types/BasicTypes.hpp
>
5
#include <
Os/Queue.hpp
>
6
#ifndef BUILD_DARWIN // Allow compiling
7
#include <mqueue.h>
8
#endif
9
10
namespace
Os
{
11
12
class
LocklessQueue
{
13
14
typedef
struct
QueueNode_s {
15
U8
* data;
16
NATIVE_INT_TYPE
size;
17
struct
QueueNode_s * next;
18
} QueueNode;
19
20
public
:
21
22
LocklessQueue
(
NATIVE_INT_TYPE
maxmsg,
NATIVE_INT_TYPE
msgsize);
23
~LocklessQueue
();
24
25
#ifndef BUILD_DARWIN // Allow compiling
26
void
GetAttr
(mq_attr & attr);
27
#endif
28
29
Os::Queue::QueueStatus
Send
(
const
U8
* buffer,
NATIVE_INT_TYPE
size);
30
Os::Queue::QueueStatus
Receive
(
U8
* buffer,
NATIVE_INT_TYPE
capacity,
NATIVE_INT_TYPE
& size);
31
32
private
:
33
bool
PopFree (QueueNode ** free_node);
34
void
PushFree (QueueNode * my_node);
35
36
QueueNode * m_first;
37
QueueNode * m_last;
38
39
QueueNode * m_free_head;
40
41
QueueNode * m_index;
42
U8
* m_data;
43
#ifndef BUILD_DARWIN
44
mq_attr m_attr;
45
#endif
46
};
47
48
}
49
50
#endif
Os
Definition:
File.cpp:7
Os::LocklessQueue::~LocklessQueue
~LocklessQueue()
Definition:
LocklessQueue.cpp:47
U8
uint8_t U8
8-bit unsigned integer
Definition:
BasicTypes.hpp:76
Os::Queue::QueueStatus
QueueStatus
Definition:
Queue.hpp:27
Os::LocklessQueue::Receive
Os::Queue::QueueStatus Receive(U8 *buffer, NATIVE_INT_TYPE capacity, NATIVE_INT_TYPE &size)
Definition:
LocklessQueue.cpp:123
Os::LocklessQueue::Send
Os::Queue::QueueStatus Send(const U8 *buffer, NATIVE_INT_TYPE size)
Definition:
LocklessQueue.cpp:88
Os::LocklessQueue::GetAttr
void GetAttr(mq_attr &attr)
Definition:
LocklessQueue.cpp:53
BasicTypes.hpp
Declares ISF basic types.
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition:
BasicTypes.hpp:29
Os::LocklessQueue
Definition:
LocklessQueue.hpp:12
Os::LocklessQueue::LocklessQueue
LocklessQueue(NATIVE_INT_TYPE maxmsg, NATIVE_INT_TYPE msgsize)
Definition:
LocklessQueue.cpp:11
Queue.hpp
Os
LocklessQueue.hpp
Generated by
1.8.19