-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtatomic.h
More file actions
33 lines (24 loc) · 679 Bytes
/
tatomic.h
File metadata and controls
33 lines (24 loc) · 679 Bytes
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
/*
* define an integer type 'nonatomic_t' and declares a variable 'x' using it
*
* also define an identical-sized type 'testint_t' that will never be qualified
* as volatile, and the size of which can be controlled at compile time by
* defining NONATOMIC_TYPE as a base integer type.
*/
#ifdef USE_VOLATILE
# define AS_VOLATILE volatile
#else
# define AS_VOLATILE /* empty */
#endif
#ifndef NONATOMIC_TYPE
# define NONATOMIC_TYPE unsigned int
#endif
typedef NONATOMIC_TYPE testint_t;
typedef AS_VOLATILE testint_t nonatomic_t;
#ifndef DO_DEFINE
# define AS_EXTERN extern
#else
# define AS_EXTERN /* empty */
#endif
AS_EXTERN nonatomic_t x;
void catch_signal(int);