e36efdc5 |
1 | |
2 | #include <stdio.h> |
3 | #include <unistd.h> |
4 | |
5 | #define LTT_TRACE |
6 | #define LTT_BLOCKING 1 |
7 | #include <ltt/ltt-facility-user_generic.h> |
8 | #include <ltt/ltt-facility-custom-user_generic.h> |
9 | |
10 | |
11 | int main(int argc, char **argv) |
12 | { |
13 | printf("Will trace a printf of an incrementing counter.\n"); |
14 | unsigned int count = 0; |
15 | |
16 | while(1) { |
15146922 |
17 | trace_user_generic_slow_printf("in: %s at: %s:%d: Counter value is: %u.", |
18 | __FILE__, __func__, __LINE__, count); |
e36efdc5 |
19 | count++; |
20 | sleep(1); |
21 | } |
22 | |
23 | return 0; |
24 | } |
25 | |