1 /*
2  * Copyright (c) 2021 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_TRACING_SYSVIEW_IDS_H_
8 #define ZEPHYR_TRACING_SYSVIEW_IDS_H_
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #define TID_OFFSET (32u)
15 
16 #define TID_SCHED_LOCK   (0u + TID_OFFSET)
17 #define TID_SCHED_UNLOCK (1u + TID_OFFSET)
18 #define TID_BUSYWAIT     (2u + TID_OFFSET)
19 
20 #define TID_IRQ_ENABLE  (3u + TID_OFFSET)
21 #define TID_IRQ_DISABLE (4u + TID_OFFSET)
22 
23 #define TID_MUTEX_INIT   (5u + TID_OFFSET)
24 #define TID_MUTEX_UNLOCK (6u + TID_OFFSET)
25 #define TID_MUTEX_LOCK   (7u + TID_OFFSET)
26 
27 #define TID_SEMA_INIT  (8u + TID_OFFSET)
28 #define TID_SEMA_GIVE  (9u + TID_OFFSET)
29 #define TID_SEMA_TAKE  (10u + TID_OFFSET)
30 #define TID_SEMA_RESET (59u + TID_OFFSET)
31 
32 #define TID_QUEUE_INIT          (11u + TID_OFFSET)
33 #define TID_QUEUE_APPEND        (12u + TID_OFFSET)
34 #define TID_QUEUE_ALLOC_APPEND  (13u + TID_OFFSET)
35 #define TID_QUEUE_PREPEND       (14u + TID_OFFSET)
36 #define TID_QUEUE_ALLOC_PREPEND (15u + TID_OFFSET)
37 #define TID_QUEUE_INSERT        (16u + TID_OFFSET)
38 #define TID_QUEUE_APPEND_LIST   (17u + TID_OFFSET)
39 #define TID_QUEUE_GET           (18u + TID_OFFSET)
40 #define TID_QUEUE_REMOVE        (19u + TID_OFFSET)
41 #define TID_QUEUE_CANCEL_WAIT   (20u + TID_OFFSET)
42 #define TID_QUEUE_PEAK_HEAD     (21u + TID_OFFSET)
43 #define TID_QUEUE_PEAK_TAIL     (22u + TID_OFFSET)
44 
45 #define TID_STACK_INIT          (23u + TID_OFFSET)
46 #define TID_STACK_PUSH          (24u + TID_OFFSET)
47 #define TID_STACK_POP           (25u + TID_OFFSET)
48 #define TID_QUEUE_STACK_CLEANUP (26u + TID_OFFSET)
49 
50 #define TID_MSGQ_INIT    (27u + TID_OFFSET)
51 #define TID_MSGQ_PUT     (28u + TID_OFFSET)
52 #define TID_MSGQ_GET     (29u + TID_OFFSET)
53 #define TID_MSGQ_CLEANUP (30u + TID_OFFSET)
54 #define TID_MSQG_PEEK    (31u + TID_OFFSET)
55 #define TID_MSGQ_PURGE   (32u + TID_OFFSET)
56 
57 #define TID_MBOX_INIT           (33u + TID_OFFSET)
58 #define TID_MBOX_PUT            (34u + TID_OFFSET)
59 #define TID_MBOX_ASYNC_PUT      (35u + TID_OFFSET)
60 #define TID_MBOX_GET            (36u + TID_OFFSET)
61 #define TID_MBOX_DATA_GET       (37u + TID_OFFSET)
62 #define TID_MBOX_DATA_BLOCK_GET (38u + TID_OFFSET)
63 
64 #define TID_PIPE_INIT      (39u + TID_OFFSET)
65 #define TID_PIPE_CLEANUP   (40u + TID_OFFSET)
66 #define TID_PIPE_PUT       (41u + TID_OFFSET)
67 #define TID_PIPE_GET       (42u + TID_OFFSET)
68 #define TID_PIPE_BLOCK_GET (43u + TID_OFFSET)
69 
70 #define TID_HEAP_INIT          (44u + TID_OFFSET)
71 #define TID_HEAP_ALLOC         (45u + TID_OFFSET)
72 #define TID_HEAP_CALLOC        (46u + TID_OFFSET)
73 #define TID_HEAP_FREE          (47u + TID_OFFSET)
74 #define TID_HEAP_ALIGNED_ALLOC (48u + TID_OFFSET)
75 #define TID_HEAP_REALLOC       (49u + TID_OFFSET)
76 
77 #define TID_MSLAB_INIT  (52u + TID_OFFSET)
78 #define TID_MSLAB_ALLOC (53u + TID_OFFSET)
79 #define TID_MSLAB_FREE  (54u + TID_OFFSET)
80 
81 #define TID_TIMER_INIT          (55u + TID_OFFSET)
82 #define TID_TIMER_START         (56u + TID_OFFSET)
83 #define TID_TIMER_STOP          (57u + TID_OFFSET)
84 #define TID_TIMER_STATUS_SYNC   (58u + TID_OFFSET)
85 #define TID_TIMER_USER_DATA_GET (60u + TID_OFFSET)
86 #define TID_TIMER_EXPIRY_FN     (61u + TID_OFFSET)
87 #define TID_TIMER_STOP_FN       (62u + TID_OFFSET)
88 
89 #define TID_SLEEP  (63u + TID_OFFSET)
90 #define TID_MSLEEP (64u + TID_OFFSET)
91 #define TID_USLEEP (65u + TID_OFFSET)
92 
93 #define TID_THREAD_PRIORITY_SET     (66u + TID_OFFSET)
94 #define TID_THREAD_WAKEUP           (67u + TID_OFFSET)
95 #define TID_THREAD_ABORT            (68u + TID_OFFSET)
96 #define TID_THREAD_START            (69u + TID_OFFSET)
97 #define TID_THREAD_SUSPEND          (70u + TID_OFFSET)
98 #define TID_THREAD_RESUME           (71u + TID_OFFSET)
99 #define TID_THREAD_JOIN             (72u + TID_OFFSET)
100 #define TID_THREAD_YIELD            (73u + TID_OFFSET)
101 #define TID_THREAD_USERMODE_ENTER   (74u + TID_OFFSET)
102 #define TID_THREAD_FOREACH          (75u + TID_OFFSET)
103 #define TID_THREAD_FOREACH_UNLOCKED (76u + TID_OFFSET)
104 #define TID_THREAD_NAME_SET         (123u + TID_OFFSET)
105 
106 #define TID_CONDVAR_INIT      (77u + TID_OFFSET)
107 #define TID_CONDVAR_SIGNAL    (78u + TID_OFFSET)
108 #define TID_CONDVAR_BROADCAST (79u + TID_OFFSET)
109 #define TID_CONDVAR_WAIT      (80u + TID_OFFSET)
110 
111 #define TID_WORK_CANCEL                (81u + TID_OFFSET)
112 #define TID_WORK_CANCEL_DELAYABLE      (82u + TID_OFFSET)
113 #define TID_WORK_CANCEL_DELAYABLE_SYNC (83u + TID_OFFSET)
114 #define TID_WORK_CANCEL_SYNC           (84u + TID_OFFSET)
115 #define TID_WORK_DELAYABLE_INIT        (85u + TID_OFFSET)
116 #define TID_WORK_QUEUE_DRAIN           (86u + TID_OFFSET)
117 #define TID_WORK_FLUSH                 (87u + TID_OFFSET)
118 #define TID_WORK_FLUSH_DELAYABLE       (88u + TID_OFFSET)
119 #define TID_WORK_INIT                  (89u + TID_OFFSET)
120 #define TID_WORK_POLL_CANCEL           (90u + TID_OFFSET)
121 #define TID_WORK_POLL_INIT             (91u + TID_OFFSET)
122 #define TID_WORK_POLL_SUBMIT           (92u + TID_OFFSET)
123 #define TID_WORK_POLL_SUBMIT_TO_QUEUE  (93u + TID_OFFSET)
124 #define TID_WORK_QUEUE_START           (94u + TID_OFFSET)
125 #define TID_WORK_RESCHEDULE            (95u + TID_OFFSET)
126 #define TID_WORK_RESCHEDULE_FOR_QUEUE  (96u + TID_OFFSET)
127 #define TID_WORK_SCHEDULE              (97u + TID_OFFSET)
128 #define TID_WORK_SCHEDULE_FOR_QUEUE    (98u + TID_OFFSET)
129 #define TID_WORK_SUBMIT                (99u + TID_OFFSET)
130 #define TID_WORK_SUBMIT_TO_QUEUE       (100u + TID_OFFSET)
131 #define TID_WORK_QUEUE_UNPLUG          (101u + TID_OFFSET)
132 #define TID_WORK_QUEUE_INIT            (102u + TID_OFFSET)
133 #define TID_WORK_QUEUE_STOP            (103u + TID_OFFSET)
134 
135 #define TID_FIFO_INIT        (110u + TID_OFFSET)
136 #define TID_FIFO_CANCEL_WAIT (111u + TID_OFFSET)
137 #define TID_FIFO_ALLOC_PUT   (112u + TID_OFFSET)
138 #define TID_FIFO_PUT_LIST    (113u + TID_OFFSET)
139 #define TID_FIFO_PUT_SLIST   (114u + TID_OFFSET)
140 #define TID_FIFO_PEAK_HEAD   (115u + TID_OFFSET)
141 #define TID_FIFO_PEAK_TAIL   (116u + TID_OFFSET)
142 #define TID_FIFO_PUT         (117u + TID_OFFSET)
143 #define TID_FIFO_GET         (118u + TID_OFFSET)
144 
145 #define TID_LIFO_INIT      (119u + TID_OFFSET)
146 #define TID_LIFO_PUT       (120u + TID_OFFSET)
147 #define TID_LIFO_GET       (121u + TID_OFFSET)
148 #define TID_LIFO_ALLOC_PUT (122u + TID_OFFSET)
149 
150 #define TID_PM_SYSTEM_SUSPEND           (124u + TID_OFFSET)
151 #define TID_PM_DEVICE_RUNTIME_GET       (125u + TID_OFFSET)
152 #define TID_PM_DEVICE_RUNTIME_PUT       (126u + TID_OFFSET)
153 #define TID_PM_DEVICE_RUNTIME_PUT_ASYNC (127u + TID_OFFSET)
154 #define TID_PM_DEVICE_RUNTIME_ENABLE    (128u + TID_OFFSET)
155 #define TID_PM_DEVICE_RUNTIME_DISABLE   (129u + TID_OFFSET)
156 
157 #define TID_SYSCALL (130u + TID_OFFSET)
158 
159 #define TID_NAMED_EVENT (131u + TID_OFFSET)
160 
161 /* latest ID is 130 */
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif /* ZEPHYR_TRACING_SYSVIEW_IDS_H_ */
168