42 |
static inline L4_Clock_t \ |
static inline L4_Clock_t \ |
43 |
L4_Clock ## name ## Usec (const L4_Clock_t clock, const L4_Word64_t usec) \ |
L4_Clock ## name ## Usec (const L4_Clock_t clock, const L4_Word64_t usec) \ |
44 |
{ \ |
{ \ |
45 |
return ((L4_Clock_t) { .clock = clock.clock op usec }); \ |
L4_Clock_t new_clock; \ |
46 |
|
new_clock.clock = clock.clock op usec; \ |
47 |
|
return new_clock; \ |
48 |
} |
} |
49 |
|
|
50 |
_L4_CLOCK_OP(Add, +) |
_L4_CLOCK_OP(Add, +) |
61 |
|
|
62 |
_L4_CLOCK_OP(Earlier, <) |
_L4_CLOCK_OP(Earlier, <) |
63 |
_L4_CLOCK_OP(Later, >) |
_L4_CLOCK_OP(Later, >) |
64 |
_L4_CLOCK_OP(Equal, =) |
_L4_CLOCK_OP(Equal, ==) |
65 |
_L4_CLOCK_OP(NotEqual, !=) |
_L4_CLOCK_OP(NotEqual, !=) |
66 |
#undef _L4_CLOCK_OP |
#undef _L4_CLOCK_OP |
67 |
|
|
72 |
static inline L4_Clock_t \ |
static inline L4_Clock_t \ |
73 |
operator ## op ## (const L4_Clock_t& clock, const type usec) \ |
operator ## op ## (const L4_Clock_t& clock, const type usec) \ |
74 |
{ \ |
{ \ |
75 |
return ((L4_Clock_t) { .clock = clock.clock op usec }); \ |
L4_Clock_t new_clock; \ |
76 |
|
new_clock.clock = clock op usec; \ |
77 |
|
return new_clock; \ |
78 |
} |
} |
79 |
|
|
80 |
_L4_CLOCK_OP(+, int) |
_L4_CLOCK_OP(+, int) |