TNeo
BETA v1.08-11-g97e5a6d
core
tn_common_macros.h
Go to the documentation of this file.
1
/*******************************************************************************
2
*
3
* TNeo: real-time kernel initially based on TNKernel
4
*
5
* TNKernel: copyright 2004, 2013 Yuri Tiomkin.
6
* PIC32-specific routines: copyright 2013, 2014 Anders Montonen.
7
* TNeo: copyright 2014 Dmitry Frank.
8
*
9
* TNeo was born as a thorough review and re-implementation of
10
* TNKernel. The new kernel has well-formed code, inherited bugs are fixed
11
* as well as new features being added, and it is tested carefully with
12
* unit-tests.
13
*
14
* API is changed somewhat, so it's not 100% compatible with TNKernel,
15
* hence the new name: TNeo.
16
*
17
* Permission to use, copy, modify, and distribute this software in source
18
* and binary forms and its documentation for any purpose and without fee
19
* is hereby granted, provided that the above copyright notice appear
20
* in all copies and that both that copyright notice and this permission
21
* notice appear in supporting documentation.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE DMITRY FRANK AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DMITRY FRANK OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33
* THE POSSIBILITY OF SUCH DAMAGE.
34
*
35
******************************************************************************/
36
37
/**
38
* \file
39
*
40
* Macros that may be useful for any part of the kernel.
41
* Note: only preprocessor macros allowed here, so that the file can be
42
* included in any source file (C, assembler, or whatever)
43
*/
44
45
#ifndef _TN_COMMON_MACROS_H
46
#define _TN_COMMON_MACROS_H
47
48
49
/*******************************************************************************
50
* DEFINITIONS
51
******************************************************************************/
52
53
54
/**
55
* Macro that expands to string representation of its argument:
56
* for example,
57
*
58
* \code{.c}
59
* _TN_STRINGIFY_LITERAL(5)
60
* \endcode
61
*
62
* expands to:
63
*
64
* \code{.c}
65
* "5"
66
* \endcode
67
*
68
* See also _TN_STRINGIFY_MACRO()
69
*/
70
#define _TN_STRINGIFY_LITERAL(x) #x
71
72
/**
73
* Macro that expands to string representation of its argument, which is
74
* allowed to be a macro:
75
* for example,
76
*
77
* \code{.c}
78
* #define MY_VALUE 10
79
* _TN_STRINGIFY_MACRO(MY_VALUE)
80
* \endcode
81
*
82
* expands to:
83
*
84
* \code{.c}
85
* "10"
86
* \endcode
87
*/
88
#define _TN_STRINGIFY_MACRO(x) _TN_STRINGIFY_LITERAL(x)
89
90
91
92
93
#endif // _TN_COMMON_MACROS_H
94
95
/*******************************************************************************
96
* end of file
97
******************************************************************************/
98
99
Generated on Sat Mar 18 2017 22:06:48 for TNeo by
1.8.14