-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtxCommon.hpp
69 lines (63 loc) · 1.3 KB
/
txCommon.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include <cstdint>
#include <cstdlib>
#include <cstring>
// This file contains common type definitions and error enumerations for ThreadX.
namespace ThreadX::Native
{
#include "tx_api.h"
} // namespace ThreadX::Native
namespace ThreadX
{
using Char = Native::CHAR;
using Uchar = Native::UCHAR;
using Int = Native::INT;
using Uint = Native::UINT; // size_t
using Long = Native::LONG;
using Ulong = Native::ULONG; // uint32_t
using Ulong64 = Native::ULONG64; // uint64_t
using Short = Native::SHORT;
using Ushort = Native::USHORT;
inline constexpr auto wordSize{sizeof(Ulong)};
static_assert(wordSize >= sizeof(uintptr_t));
enum class Error : Uint
{
success,
deleted,
poolError,
ptrError,
waitError,
sizeError,
groupError,
noEvents,
optionError,
queueError,
queueEmpty,
queueFull,
semaphoreError,
noInstance,
threadError,
priorityError,
noMemory,
startError = noMemory,
deleteError,
resumeError,
callerError,
suspendError,
timerError,
tickError,
activateError,
threshError,
suspendLifted,
waitAborted,
waitAbortError,
mutexError,
notAvailable,
notOwned,
inheretError,
notDone,
ceilingExceeded,
invalidCeiling,
featureNotEnabled = 0xFF
};
} // namespace ThreadX