9
9
10
10
#ifdef CONFIG_DEMAND_PAGING_THREAD_STATS
11
11
#include <zephyr/kernel/mm/demand_paging.h>
12
- #endif
12
+ #endif /* CONFIG_DEMAND_PAGING_THREAD_STATS */
13
13
14
14
#include <zephyr/kernel/stats.h>
15
15
#include <zephyr/arch/arch_interface.h>
@@ -38,7 +38,7 @@ struct __thread_entry {
38
38
void * parameter2 ;
39
39
void * parameter3 ;
40
40
};
41
- #endif
41
+ #endif /* CONFIG_THREAD_MONITOR */
42
42
43
43
struct k_thread ;
44
44
@@ -96,14 +96,14 @@ struct _thread_base {
96
96
#else /* Little Endian */
97
97
int8_t prio ;
98
98
uint8_t sched_locked ;
99
- #endif
99
+ #endif /* CONFIG_BIG_ENDIAN */
100
100
};
101
101
uint16_t preempt ;
102
102
};
103
103
104
104
#ifdef CONFIG_SCHED_DEADLINE
105
105
int prio_deadline ;
106
- #endif
106
+ #endif /* CONFIG_SCHED_DEADLINE */
107
107
108
108
uint32_t order_key ;
109
109
@@ -117,15 +117,15 @@ struct _thread_base {
117
117
/* Recursive count of irq_lock() calls */
118
118
uint8_t global_lock_count ;
119
119
120
- #endif
120
+ #endif /* CONFIG_SMP */
121
121
122
122
#ifdef CONFIG_SCHED_CPU_MASK
123
123
/* "May run on" bits for each CPU */
124
124
#if CONFIG_MP_MAX_NUM_CPUS <= 8
125
125
uint8_t cpu_mask ;
126
126
#else
127
127
uint16_t cpu_mask ;
128
- #endif
128
+ #endif /* CONFIG_MP_MAX_NUM_CPUS */
129
129
#endif /* CONFIG_SCHED_CPU_MASK */
130
130
131
131
/* data returned by APIs */
@@ -134,17 +134,17 @@ struct _thread_base {
134
134
#ifdef CONFIG_SYS_CLOCK_EXISTS
135
135
/* this thread's entry in a timeout queue */
136
136
struct _timeout timeout ;
137
- #endif
137
+ #endif /* CONFIG_SYS_CLOCK_EXISTS */
138
138
139
139
#ifdef CONFIG_TIMESLICE_PER_THREAD
140
140
int32_t slice_ticks ;
141
141
k_thread_timeslice_fn_t slice_expired ;
142
142
void * slice_data ;
143
- #endif
143
+ #endif /* CONFIG_TIMESLICE_PER_THREAD */
144
144
145
145
#ifdef CONFIG_SCHED_THREAD_USAGE
146
146
struct k_cycle_stats usage ; /* Track thread usage statistics */
147
- #endif
147
+ #endif /* CONFIG_SCHED_THREAD_USAGE */
148
148
};
149
149
150
150
typedef struct _thread_base _thread_base_t ;
@@ -190,9 +190,9 @@ struct _mem_domain_info {
190
190
struct _thread_userspace_local_data {
191
191
#if defined(CONFIG_ERRNO ) && !defined(CONFIG_ERRNO_IN_TLS ) && !defined(CONFIG_LIBC_ERRNO )
192
192
int errno_var ;
193
- #endif
193
+ #endif /* CONFIG_ERRNO && !CONFIG_ERRNO_IN_TLS && !CONFIG_LIBC_ERRNO */
194
194
};
195
- #endif
195
+ #endif /* CONFIG_THREAD_USERSPACE_LOCAL_DATA */
196
196
197
197
typedef struct k_thread_runtime_stats {
198
198
#ifdef CONFIG_SCHED_THREAD_USAGE
@@ -203,7 +203,7 @@ typedef struct k_thread_runtime_stats {
203
203
* as the total # of non-idle cycles. In the context of CPU statistics,
204
204
* it refers to the sum of non-idle + idle cycles.
205
205
*/
206
- #endif
206
+ #endif /* CONFIG_SCHED_THREAD_USAGE */
207
207
208
208
#ifdef CONFIG_SCHED_THREAD_USAGE_ANALYSIS
209
209
/*
@@ -216,7 +216,7 @@ typedef struct k_thread_runtime_stats {
216
216
uint64_t current_cycles ; /* current # of non-idle cycles */
217
217
uint64_t peak_cycles ; /* peak # of non-idle cycles */
218
218
uint64_t average_cycles ; /* average # of non-idle cycles */
219
- #endif
219
+ #endif /* CONFIG_SCHED_THREAD_USAGE_ANALYSIS */
220
220
221
221
#ifdef CONFIG_SCHED_THREAD_USAGE_ALL
222
222
/*
@@ -226,7 +226,7 @@ typedef struct k_thread_runtime_stats {
226
226
*/
227
227
228
228
uint64_t idle_cycles ;
229
- #endif
229
+ #endif /* CONFIG_SCHED_THREAD_USAGE_ALL */
230
230
231
231
#if defined(__cplusplus ) && !defined(CONFIG_SCHED_THREAD_USAGE ) && \
232
232
!defined(CONFIG_SCHED_THREAD_USAGE_ANALYSIS ) && !defined(CONFIG_SCHED_THREAD_USAGE_ALL )
@@ -262,7 +262,7 @@ struct k_thread {
262
262
263
263
#if defined(CONFIG_POLL )
264
264
struct z_poller poller ;
265
- #endif
265
+ #endif /* CONFIG_POLL */
266
266
267
267
#if defined(CONFIG_EVENTS )
268
268
struct k_thread * next_event_link ;
@@ -272,36 +272,36 @@ struct k_thread {
272
272
273
273
/** true if timeout should not wake the thread */
274
274
bool no_wake_on_timeout ;
275
- #endif
275
+ #endif /* CONFIG_EVENTS */
276
276
277
277
#if defined(CONFIG_THREAD_MONITOR )
278
278
/** thread entry and parameters description */
279
279
struct __thread_entry entry ;
280
280
281
281
/** next item in list of all threads */
282
282
struct k_thread * next_thread ;
283
- #endif
283
+ #endif /* CONFIG_THREAD_MONITOR */
284
284
285
285
#if defined(CONFIG_THREAD_NAME )
286
286
/** Thread name */
287
287
char name [CONFIG_THREAD_MAX_NAME_LEN ];
288
- #endif
288
+ #endif /* CONFIG_THREAD_NAME */
289
289
290
290
#ifdef CONFIG_THREAD_CUSTOM_DATA
291
291
/** crude thread-local storage */
292
292
void * custom_data ;
293
- #endif
293
+ #endif /* CONFIG_THREAD_CUSTOM_DATA */
294
294
295
295
#ifdef CONFIG_THREAD_USERSPACE_LOCAL_DATA
296
296
struct _thread_userspace_local_data * userspace_local_data ;
297
- #endif
297
+ #endif /* CONFIG_THREAD_USERSPACE_LOCAL_DATA */
298
298
299
299
#if defined(CONFIG_ERRNO ) && !defined(CONFIG_ERRNO_IN_TLS ) && !defined(CONFIG_LIBC_ERRNO )
300
300
#ifndef CONFIG_USERSPACE
301
301
/** per-thread errno variable */
302
302
int errno_var ;
303
- #endif
304
- #endif
303
+ #endif /* CONFIG_USERSPACE */
304
+ #endif /* CONFIG_ERRNO && !CONFIG_ERRNO_IN_TLS && !CONFIG_LIBC_ERRNO */
305
305
306
306
#if defined(CONFIG_THREAD_STACK_INFO )
307
307
/** Stack Info */
@@ -328,7 +328,7 @@ struct k_thread {
328
328
329
329
/** Context handle returned via arch_switch() */
330
330
void * switch_handle ;
331
- #endif
331
+ #endif /* CONFIG_USE_SWITCH */
332
332
/** resource pool */
333
333
struct k_heap * resource_pool ;
334
334
@@ -340,21 +340,21 @@ struct k_thread {
340
340
#ifdef CONFIG_DEMAND_PAGING_THREAD_STATS
341
341
/** Paging statistics */
342
342
struct k_mem_paging_stats_t paging_stats ;
343
- #endif
343
+ #endif /* CONFIG_DEMAND_PAGING_THREAD_STATS */
344
344
345
345
#ifdef CONFIG_PIPES
346
346
/** Pipe descriptor used with blocking k_pipe operations */
347
347
struct _pipe_desc pipe_desc ;
348
- #endif
348
+ #endif /* CONFIG_PIPES */
349
349
350
350
#ifdef CONFIG_OBJ_CORE_THREAD
351
351
struct k_obj_core obj_core ;
352
- #endif
352
+ #endif /* CONFIG_OBJ_CORE_THREAD */
353
353
354
354
#ifdef CONFIG_SMP
355
355
/** threads waiting in k_thread_suspend() */
356
356
_wait_q_t halt_queue ;
357
- #endif
357
+ #endif /* CONFIG_SMP */
358
358
359
359
/** arch-specifics: must always be at the end */
360
360
struct _thread_arch arch ;
@@ -363,4 +363,4 @@ struct k_thread {
363
363
typedef struct k_thread _thread_t ;
364
364
typedef struct k_thread * k_tid_t ;
365
365
366
- #endif
366
+ #endif /* ZEPHYR_INCLUDE_KERNEL_THREAD_H_ */
0 commit comments