Skip to content

Commit 7bf1139

Browse files
committed
fix style and missing comments
1 parent 7a1e5c7 commit 7bf1139

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

so3/arch/arm32/thread.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ void arch_prepare_cpu_regs(tcb_t *tcb, clone_args_t *args)
4747
arch_restart_user_thread(tcb, args->fn, args->stack);
4848
} else {
4949
/* Normal userspace that will copy userspace registers */
50-
if (args->stack) {
50+
if (args->stack)
5151
user_regs->sp_usr = args->stack;
52-
}
5352

54-
if (args->flags & CLONE_SETTLS) {
53+
if (args->flags & CLONE_SETTLS)
5554
user_regs->tls_usr = args->tls;
56-
}
5755

5856
/* Copy userspace registers */
5957
*user_regs = *(cpu_regs_t *) arch_get_kernel_stack_frame(current());

so3/arch/arm64/thread.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ void arch_prepare_cpu_regs(tcb_t *tcb, clone_args_t *args)
4646
arch_restart_user_thread(tcb, args->fn, args->stack);
4747
} else {
4848
/* Normal userspace that will copy userspace registers */
49-
if (args->stack) {
49+
if (args->stack)
5050
user_regs->sp_usr = args->stack;
51-
}
5251

53-
if (args->flags & CLONE_SETTLS) {
52+
if (args->flags & CLONE_SETTLS)
5453
user_regs->tls_usr = args->tls;
55-
}
5654

5755
/* Copy userspace registers */
5856
*user_regs = *(cpu_regs_t *) arch_get_kernel_stack_frame(current());

so3/kernel/thread.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ void set_thread_registers(tcb_t *thread, cpu_regs_t *regs)
347347
* Thread creation routine
348348
*
349349
* @param args Aguments to create the thread
350+
*
351+
* @return TCB of the newly created thread.
350352
*/
351353
tcb_t *thread_create(clone_args_t *args)
352354
{
@@ -402,9 +404,8 @@ tcb_t *thread_create(clone_args_t *args)
402404
*args->parent_tid = tcb->tid;
403405
}
404406

405-
if (args->flags & CLONE_CHILD_CLEARTID) {
407+
if (args->flags & CLONE_CHILD_CLEARTID)
406408
tcb->child_clear_tid = (addr_t) args->child_tid;
407-
}
408409

409410
local_irq_restore(flags);
410411

@@ -418,6 +419,8 @@ tcb_t *thread_create(clone_args_t *args)
418419
* @param name Name of the thread.
419420
* @param arg Arguments passed to the function called by the thread.
420421
* @param prio The thread scheduling priority.
422+
*
423+
* @return TCB of the newly created thread.
421424
*/
422425
tcb_t *kernel_thread(th_fn_t start_routine, const char *name, void *arg, uint32_t prio)
423426
{
@@ -434,8 +437,9 @@ tcb_t *kernel_thread(th_fn_t start_routine, const char *name, void *arg, uint32_
434437
/**
435438
* Create a new user thread based on given arguments.
436439
*
437-
* @param args
438-
* @return Address of the corresponding TCB
440+
* @param args Aguments to create the user thread
441+
*
442+
* @return TCB of the newly created thread.
439443
*/
440444
tcb_t *user_thread(clone_args_t *args)
441445
{

0 commit comments

Comments
 (0)