Home
last modified time | relevance | path

Searched refs:tid (Results 1 – 25 of 143) sorted by relevance

123456

/Zephyr-latest/subsys/portability/cmsis_rtos_v2/
Dthread.c57 struct cv2_thread *tid = arg2; in zephyr_thread_wrapper() local
62 tid->has_joined = TRUE; in zephyr_thread_wrapper()
63 k_sem_give(&tid->join_guard); in zephyr_thread_wrapper()
82 osThreadId_t get_cmsis_thread_id(k_tid_t tid) in get_cmsis_thread_id() argument
87 if (tid != NULL) { in get_cmsis_thread_id()
91 if (&itr->z_thread == tid) { in get_cmsis_thread_id()
108 struct cv2_thread *tid; in osThreadNew() local
164 tid = &cv2_thread_pool[this_thread_num]; in osThreadNew()
165 tid->attr_bits = attr->attr_bits; in osThreadNew()
183 k_poll_signal_init(&tid->poll_signal); in osThreadNew()
[all …]
Dthread_flags.c18 struct cv2_thread *tid = (struct cv2_thread *)thread_id; in osThreadFlagsSet() local
26 tid->signal_results |= flags; in osThreadFlagsSet()
29 k_poll_signal_raise(&tid->poll_signal, DONT_CARE); in osThreadFlagsSet()
31 return tid->signal_results; in osThreadFlagsSet()
39 struct cv2_thread *tid; in osThreadFlagsGet() local
45 tid = (struct cv2_thread *)osThreadGetId(); in osThreadFlagsGet()
46 if (tid == NULL) { in osThreadFlagsGet()
49 return tid->signal_results; in osThreadFlagsGet()
58 struct cv2_thread *tid; in osThreadFlagsClear() local
69 tid = (struct cv2_thread *)osThreadGetId(); in osThreadFlagsClear()
[all …]
/Zephyr-latest/tests/benchmarks/sched_userspace/src/
Dmain.c81 for (size_t tid = 0; tid < nb_threads; tid++) { in exec_test() local
82 app_threads[tid].partition = app_partitions[tid]; in exec_test()
83 app_threads[tid].stack = &app_thread_stacks[tid]; in exec_test()
85 void *_tid = (void *)(uintptr_t)tid; in exec_test()
87 threads[tid] = k_thread_create(&app_threads[tid].thread, in exec_test()
88 app_thread_stacks[tid], in exec_test()
90 &app_threads[tid], _tid, (void *)(uintptr_t)nb_threads, in exec_test()
101 for (size_t tid = 0; tid < nb_threads; tid++) { in exec_test() local
102 k_thread_start(threads[tid]); in exec_test()
104 for (size_t tid = 0; tid < nb_threads; tid++) { in exec_test() local
[all …]
/Zephyr-latest/tests/kernel/threads/thread_apis/src/
Dtest_kthread_for_each.c104 k_tid_t tid = k_thread_create(&tdata, tstack, in ZTEST() local
119 k_thread_abort(tid); in ZTEST()
153 k_tid_t tid = k_thread_create(&tdata, tstack, in ZTEST() local
181 k_thread_abort(tid); in ZTEST()
227 k_tid_t tid = &tdata1; in ZTEST() local
229 tid->base.thread_state = 0; in ZTEST()
230 str = k_thread_state_str(tid, state_str, sizeof(state_str)); in ZTEST()
233 tid->base.thread_state = _THREAD_DUMMY; in ZTEST()
235 str = k_thread_state_str(tid, NULL, sizeof(state_str)); in ZTEST()
238 str = k_thread_state_str(tid, state_str, 0); in ZTEST()
[all …]
Dtest_threads_suspend_resume.c27 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in threads_suspend_resume() local
31 k_thread_suspend(tid); in threads_suspend_resume()
35 k_thread_resume(tid); in threads_suspend_resume()
96 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
106 k_thread_abort(tid); in ZTEST()
133 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
138 k_thread_suspend(tid); in ZTEST()
147 k_thread_abort(tid); in ZTEST()
161 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
167 str = k_thread_state_str(tid, buffer, sizeof(buffer)); in ZTEST()
[all …]
Dtest_threads_cancel_abort.c66 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER() local
70 k_thread_abort(tid); in ZTEST_USER()
75 tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER()
79 k_thread_abort(tid); in ZTEST_USER()
95 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
99 k_thread_abort(tid); in ZTEST()
101 k_thread_abort(tid); in ZTEST()
103 k_thread_abort(tid); in ZTEST()
140 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
151 k_thread_abort(tid); in ZTEST()
[all …]
Dtest_threads_spawn.c116 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
124 k_thread_start(tid); in ZTEST()
127 k_thread_abort(tid); in ZTEST()
142 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
147 k_thread_start(tid); in ZTEST()
156 k_thread_start(tid); in ZTEST()
169 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER() local
174 k_thread_start(tid); in ZTEST_USER()
177 k_thread_abort(tid); in ZTEST_USER()
Dmain.c87 k_tid_t tid = k_thread_create(&tdata_custom, tstack_custom, STACK_SIZE, in ZTEST() local
94 k_thread_abort(tid); in ZTEST()
122 k_tid_t tid = k_thread_create(&tdata_name, tstack_name, STACK_SIZE, in ZTEST() local
126 ret = k_thread_name_set(tid, "customdata"); in ZTEST()
128 ret = k_thread_name_copy(tid, thread_buf, sizeof(thread_buf)); in ZTEST()
134 k_thread_abort(tid); in ZTEST()
195 k_tid_t tid = k_thread_create(&tdata_name, tstack_name, STACK_SIZE, in ZTEST_USER() local
198 ret = k_thread_name_set(tid, "customdata"); in ZTEST_USER()
200 ret = k_thread_name_copy(tid, thread_name, sizeof(thread_name)); in ZTEST_USER()
206 k_thread_abort(tid); in ZTEST_USER()
[all …]
/Zephyr-latest/tests/lib/newlib/thread_safety/src/
Dlocks.c117 k_tid_t tid; in ZTEST() local
127 tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST()
132 k_thread_join(tid, K_FOREVER); in ZTEST()
138 tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST()
143 k_thread_join(tid, K_FOREVER); in ZTEST()
196 k_tid_t tid; in ZTEST() local
202 tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST()
206 k_thread_join(tid, K_FOREVER); in ZTEST()
212 tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST()
216 k_thread_join(tid, K_FOREVER); in ZTEST()
[all …]
Dstress.c75 k_tid_t tid[THREAD_COUNT]; in ZTEST() local
79 for (i = 0; i < ARRAY_SIZE(tid); i++) { in ZTEST()
80 tid[i] = k_thread_create(&tdata[i], tstack[i], STACK_SIZE, in ZTEST()
97 for (i = 0; i < ARRAY_SIZE(tid); i++) { in ZTEST()
98 k_thread_join(tid[i], K_FOREVER); in ZTEST()
/Zephyr-latest/tests/kernel/sched/schedule_api/src/
Duser_api.c34 k_tid_t tid = k_thread_create(&user_thread, ustack, STACK_SIZE, sleepy_thread, in ZTEST_USER() local
42 k_thread_abort(tid); in ZTEST_USER()
69 k_tid_t tid = k_thread_create(&user_thread, ustack, in ZTEST_USER() local
78 k_thread_abort(tid); in ZTEST_USER()
80 tid = k_thread_create(&user_thread, ustack, STACK_SIZE, preempt_test_thread, in ZTEST_USER()
89 k_thread_abort(tid); in ZTEST_USER()
122 k_tid_t tid = k_thread_create(&user_thread, ustack, STACK_SIZE, in ZTEST_USER() local
128 k_thread_join(tid, K_FOREVER); in ZTEST_USER()
163 k_tid_t tid = k_thread_create(&user_thread, ustack, STACK_SIZE, in ZTEST_USER() local
169 k_thread_join(tid, K_FOREVER); in ZTEST_USER()
[all …]
Dtest_sched_priority.c58 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
66 k_thread_abort(tid); in ZTEST()
93 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
100 k_thread_abort(tid); in ZTEST()
103 tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST()
108 k_thread_abort(tid); in ZTEST()
126 k_tid_t tid[THREAD_NUM]; in ZTEST() local
139 tid[0] = k_thread_create(&tdata_prio[0], tstacks[0], STACK_SIZE, in ZTEST()
143 tid[1] = k_thread_create(&tdata_prio[1], tstacks[1], STACK_SIZE, in ZTEST()
147 tid[2] = k_thread_create(&tdata_prio[2], tstacks[2], STACK_SIZE, in ZTEST()
[all …]
Dtest_sched_is_preempt_thread.c73 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST() local
77 k_thread_abort(tid); in ZTEST()
80 tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST()
84 k_thread_abort(tid); in ZTEST()
/Zephyr-latest/tests/kernel/threads/dynamic_thread_stack/src/
Dmain.c41 k_tid_t tid; in ZTEST_USER() local
63 tid = k_thread_create(th, stack, CONFIG_DYNAMIC_THREAD_STACK_SIZE, func, in ZTEST_USER()
67 zassert_not_null(tid); in ZTEST_USER()
69 zassert_ok(k_thread_join(tid, K_MSEC(TIMEOUT_MS))); in ZTEST_USER()
77 static k_tid_t tid[CONFIG_DYNAMIC_THREAD_POOL_SIZE]; in ZTEST() local
107 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST()
115 zassert_ok(k_thread_join(tid[i], K_MSEC(TIMEOUT_MS))); in ZTEST()
129 static k_tid_t tid[MAX_HEAP_STACKS]; in ZTEST() local
153 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST()
161 zassert_ok(k_thread_join(tid[i], K_MSEC(TIMEOUT_MS))); in ZTEST()
[all …]
/Zephyr-latest/tests/kernel/threads/dynamic_thread/src/
Dmain.c48 k_tid_t tid; in create_dynamic_thread() local
54 tid = k_thread_create(dyn_thread, dyn_thread_stack, STACKSIZE, in create_dynamic_thread()
58 k_object_access_grant(&start_sem, tid); in create_dynamic_thread()
59 k_object_access_grant(&end_sem, tid); in create_dynamic_thread()
61 k_thread_start(tid); in create_dynamic_thread()
68 k_thread_abort(tid); in create_dynamic_thread()
75 k_tid_t tid; in permission_test() local
81 tid = k_thread_create(dyn_thread, dyn_thread_stack, STACKSIZE, in permission_test()
85 k_object_access_grant(&start_sem, tid); in permission_test()
87 k_thread_start(tid); in permission_test()
[all …]
/Zephyr-latest/tests/benchmarks/footprints/src/
Dworkq.c86 k_tid_t tid; in run_workq() local
95 tid = k_thread_create(&my_thread, my_stack_area, STACK_SIZE, in run_workq()
99 k_thread_join(tid, K_FOREVER); in run_workq()
102 tid = k_thread_create(&my_thread, my_stack_area, STACK_SIZE, in run_workq()
106 k_thread_join(tid, K_FOREVER); in run_workq()
120 tid = k_thread_create(&my_thread, my_stack_area, STACK_SIZE, in run_workq()
124 k_thread_access_grant(tid, &sync_sema, in run_workq()
128 k_mem_domain_add_thread(&footprint_mem_domain, tid); in run_workq()
130 k_thread_start(tid); in run_workq()
131 k_thread_join(tid, K_FOREVER); in run_workq()
Dmutex.c29 k_tid_t tid; in run_user_mutex() local
32 tid = k_thread_create(&my_thread, my_stack_area, STACK_SIZE, in run_user_mutex()
35 k_object_access_grant(&user_mutex, tid); in run_user_mutex()
37 k_thread_start(tid); in run_user_mutex()
38 k_thread_join(tid, K_FOREVER); in run_user_mutex()
Dtimer.c82 k_tid_t tid; in run_timer() local
86 tid = k_thread_create(&my_thread, my_stack_area, STACK_SIZE, in run_timer()
90 k_thread_join(tid, K_FOREVER); in run_timer()
93 tid = k_thread_create(&my_thread, my_stack_area, STACK_SIZE, in run_timer()
97 k_mem_domain_add_thread(&footprint_mem_domain, tid); in run_timer()
99 k_thread_access_grant(tid, &timer0); in run_timer()
100 k_thread_start(tid); in run_timer()
102 k_thread_join(tid, K_FOREVER); in run_timer()
/Zephyr-latest/tests/kernel/timer/timer_error_case/src/
Dmain.c53 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER() local
59 k_thread_join(tid, K_FOREVER); in ZTEST_USER()
91 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER() local
97 k_thread_join(tid, K_FOREVER); in ZTEST_USER()
129 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER() local
135 k_thread_join(tid, K_FOREVER); in ZTEST_USER()
167 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER() local
173 k_thread_join(tid, K_FOREVER); in ZTEST_USER()
205 k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE, in ZTEST_USER() local
211 k_thread_join(tid, K_FOREVER); in ZTEST_USER()
[all …]
/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/mesh/
Dpublisher.c18 static uint8_t tid; variable
30 net_buf_simple_add_u8(root_models[3].pub->msg, tid++); in publish()
36 net_buf_simple_add_u8(root_models[3].pub->msg, tid++); in publish()
44 net_buf_simple_add_u8(vnd_models[0].pub->msg, tid++); in publish()
52 net_buf_simple_add_u8(root_models[3].pub->msg, tid++); in publish()
58 net_buf_simple_add_u8(root_models[3].pub->msg, tid++); in publish()
66 net_buf_simple_add_u8(vnd_models[0].pub->msg, tid++); in publish()
74 net_buf_simple_add_u8(root_models[5].pub->msg, tid++); in publish()
84 net_buf_simple_add_u8(root_models[5].pub->msg, tid++); in publish()
90 net_buf_simple_add_u8(root_models[5].pub->msg, tid++); in publish()
[all …]
/Zephyr-latest/tests/kernel/usage/thread_runtime_stats/src/
Dtest_thread_runtime_stats.c68 k_tid_t tid; in ZTEST() local
76 tid = k_thread_create(&helper_thread, helper_stack, in ZTEST()
91 k_thread_abort(tid); in ZTEST()
191 k_tid_t tid; in ZTEST() local
200 tid = k_thread_create(&helper_thread, helper_stack, in ZTEST()
213 k_thread_runtime_stats_get(tid, &helper_stats1); in ZTEST()
214 k_thread_runtime_stats_disable(tid); in ZTEST()
227 k_thread_runtime_stats_enable(tid); in ZTEST()
229 k_thread_runtime_stats_get(tid, &helper_stats2); in ZTEST()
235 k_thread_runtime_stats_get(tid, &helper_stats3); in ZTEST()
[all …]
/Zephyr-latest/lib/posix/options/getopt/
Dgetopt_common.c57 k_tid_t tid; in getopt_state_get() local
59 tid = k_current_get(); in getopt_state_get()
61 if (tid == sh->ctx->tid) { in getopt_state_get()
/Zephyr-latest/kernel/
Ddynamic.c26 k_tid_t tid; member
110 __ASSERT(data->tid == NULL, "stack %p is associated with more than one thread!", in dyn_cb()
112 data->tid = (k_tid_t)thread; in dyn_cb()
123 if (data.tid != NULL) { in z_impl_k_thread_stack_free()
124 if (!(z_is_thread_state_set(data.tid, _THREAD_DUMMY) || in z_impl_k_thread_stack_free()
125 z_is_thread_state_set(data.tid, _THREAD_DEAD))) { in z_impl_k_thread_stack_free()
126 LOG_ERR("tid %p is in use!", data.tid); in z_impl_k_thread_stack_free()
/Zephyr-latest/tests/kernel/smp/src/
Dmain.c46 k_tid_t tid; member
132 k_tid_t tid = k_thread_create(&t2, t2_stack, T2_STACK_SIZE, t2_fn, in ZTEST() local
156 k_thread_abort(tid); in ZTEST()
157 k_thread_join(tid, K_FOREVER); in ZTEST()
189 k_tid_t tid = k_thread_create(&t2, t2_stack, T2_STACK_SIZE, child_fn, in ZTEST() local
197 k_thread_abort(tid); in ZTEST()
198 k_thread_join(tid, K_FOREVER); in ZTEST()
221 volatile uint8_t *p = &tinfo[i].tid->base.thread_state; in spin_for_threads_exit()
245 tinfo[i].tid = k_thread_create(&tthread[i], tstack[i], in spawn_threads()
260 k_thread_abort(tinfo[i].tid); in abort_threads()
[all …]
/Zephyr-latest/tests/kernel/mem_slab/mslab_concept/src/
Dtest_mslab_alloc_wait.c54 k_tid_t tid[THREAD_NUM]; in ZTEST() local
73 tid[0] = k_thread_create(&tdata[0], tstack[0], STACK_SIZE, in ZTEST()
77 tid[1] = k_thread_create(&tdata[1], tstack[1], STACK_SIZE, in ZTEST()
81 tid[2] = k_thread_create(&tdata[2], tstack[2], STACK_SIZE, in ZTEST()
95 k_thread_abort(tid[i]); in ZTEST()

123456