Rev 951 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
948 | serge | 1 | |
2 | |||
3 | |||
4 | |||
5 | typedef unsigned short int u16_t; |
||
6 | typedef unsigned int u32_t; |
||
7 | typedef unsigned long long u64_t; |
||
8 | |||
9 | |||
10 | |||
11 | |||
12 | typedef unsigned int count_t; |
||
13 | typedef unsigned int eflags_t; |
||
14 | |||
15 | |||
16 | |||
17 | |||
18 | #define FALSE (Bool)0 |
||
19 | |||
20 | |||
953 | serge | 21 | * min()/max() macros that also do |
22 | * strict type-checking.. See the |
||
23 | * "unnecessary" pointer comparison. |
||
24 | */ |
||
25 | #define min(x,y) ({ \ |
||
26 | typeof(x) _x = (x); \ |
||
27 | typeof(y) _y = (y); \ |
||
28 | (void) (&_x == &_y); \ |
||
29 | _x < _y ? _x : _y; }) |
||
30 | |||
31 | |||
32 | typeof(x) _x = (x); \ |
||
33 | typeof(y) _y = (y); \ |
||
34 | (void) (&_x == &_y); \ |
||
35 | _x > _y ? _x : _y; }) |
||
36 | |||
37 | |||
38 | |||
951 | serge | 39 | ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) |
40 | #define max_t(type,x,y) \ |
||
41 | ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })>> |
||
42 |