Changeset 0f4f1b2 in mainline for kernel/generic/src
- Timestamp:
- 2024-01-15T17:10:27Z (18 months ago)
- Branches:
- master
- Children:
- e82879c
- Parents:
- a064d4f
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 16:37:22)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 17:10:27)
- Location:
- kernel/generic/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
ra064d4f r0f4f1b2 1004 1004 printf("cpu%u: ", i); 1005 1005 thread_wire(thread, &cpus[i]); 1006 thread_ ready(thread_ref(thread));1006 thread_start(thread); 1007 1007 thread_join(thread); 1008 1008 } else -
kernel/generic/src/ipc/kbox.c
ra064d4f r0f4f1b2 246 246 } 247 247 248 task->kb.thread = thread_ref(kb_thread);249 thread_ ready(kb_thread);248 task->kb.thread = kb_thread; 249 thread_start(kb_thread); 250 250 } 251 251 -
kernel/generic/src/main/kinit.c
ra064d4f r0f4f1b2 122 122 123 123 thread_wire(thread, &cpus[0]); 124 thread_ ready(thread_ref(thread));124 thread_start(thread); 125 125 thread_join(thread); 126 126 … … 135 135 if (thread != NULL) { 136 136 thread_wire(thread, &cpus[i]); 137 thread_ready(thread); 137 thread_start(thread); 138 thread_detach(thread); 138 139 } else 139 140 log(LF_OTHER, LVL_ERROR, … … 151 152 thread = thread_create(kload, NULL, TASK, THREAD_FLAG_NONE, 152 153 "kload"); 153 if (thread != NULL) 154 thread_ready(thread); 155 else 154 if (thread != NULL) { 155 thread_start(thread); 156 thread_detach(thread); 157 } else { 156 158 log(LF_OTHER, LVL_ERROR, "Unable to create kload thread"); 159 } 157 160 158 161 #ifdef CONFIG_KCONSOLE … … 163 166 thread = thread_create(kconsole_thread, NULL, TASK, 164 167 THREAD_FLAG_NONE, "kconsole"); 165 if (thread != NULL) 166 thread_ready(thread); 167 else 168 if (thread != NULL) { 169 thread_start(thread); 170 thread_detach(thread); 171 } else { 168 172 log(LF_OTHER, LVL_ERROR, 169 173 "Unable to create kconsole thread"); 174 } 170 175 } 171 176 #endif /* CONFIG_KCONSOLE */ -
kernel/generic/src/main/main.c
ra064d4f r0f4f1b2 282 282 if (!kinit_thread) 283 283 panic("Cannot create kinit thread."); 284 thread_ready(kinit_thread); 284 thread_start(kinit_thread); 285 thread_detach(kinit_thread); 285 286 286 287 /* -
kernel/generic/src/proc/program.c
ra064d4f r0f4f1b2 212 212 void program_ready(program_t *prg) 213 213 { 214 thread_ready(prg->main_thread); 214 thread_start(prg->main_thread); 215 thread_detach(prg->main_thread); 215 216 prg->main_thread = NULL; 216 217 } -
kernel/generic/src/proc/thread.c
ra064d4f r0f4f1b2 234 234 } 235 235 236 /** Start a thread that wasn't started yet since it was created. 237 * 238 * @param thread A reference to the newly created thread. 239 */ 240 void thread_start(thread_t *thread) 241 { 242 assert(thread->state == Entering); 243 thread_ready(thread_ref(thread)); 244 } 245 236 246 /** Make thread ready 237 247 * … … 696 706 errno_t thread_join_timeout(thread_t *thread, uint32_t usec, unsigned int flags) 697 707 { 708 assert(thread != NULL); 709 698 710 if (thread == THREAD) 699 711 return EINVAL; … … 712 724 713 725 return rc; 726 } 727 728 void thread_detach(thread_t *thread) 729 { 730 thread_put(thread); 714 731 } 715 732
Note:
See TracChangeset
for help on using the changeset viewer.