mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
libc/pthread: Fix comment and document issue
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
@@ -293,7 +293,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
#if !defined(CONFIG_BUILD_FLAT) && !defined(CONFIG_DISABLE_PTHREAD)
|
#if !defined(CONFIG_BUILD_FLAT) && !defined(CONFIG_DISABLE_PTHREAD)
|
||||||
case SYS_pthread_start:
|
case SYS_pthread_start:
|
||||||
{
|
{
|
||||||
/* Set up to return to the user-space pthread start-up function in
|
/* Set up to enter the user-space pthread start-up function in
|
||||||
* unprivileged mode. We need:
|
* unprivileged mode. We need:
|
||||||
*
|
*
|
||||||
* R0 = entrypt
|
* R0 = entrypt
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
#if !defined(CONFIG_BUILD_FLAT) && !defined(CONFIG_DISABLE_PTHREAD)
|
#if !defined(CONFIG_BUILD_FLAT) && !defined(CONFIG_DISABLE_PTHREAD)
|
||||||
case SYS_pthread_start:
|
case SYS_pthread_start:
|
||||||
{
|
{
|
||||||
/* Set up to return to the user-space pthread start-up function in
|
/* Set up to enter the user-space pthread start-up function in
|
||||||
* unprivileged mode. We need:
|
* unprivileged mode. We need:
|
||||||
*
|
*
|
||||||
* R0 = startup
|
* R0 = startup
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
void up_pthread_start(pthread_trampoline_t startup,
|
void up_pthread_start(pthread_trampoline_t startup,
|
||||||
pthread_startroutine_t entrypt, pthread_addr_t arg)
|
pthread_startroutine_t entrypt, pthread_addr_t arg)
|
||||||
{
|
{
|
||||||
/* Let sys_call2() do all of the work */
|
/* Let sys_call3() do all of the work */
|
||||||
|
|
||||||
sys_call3(SYS_pthread_start, (uintptr_t)startup, (uintptr_t)entrypt,
|
sys_call3(SYS_pthread_start, (uintptr_t)startup, (uintptr_t)entrypt,
|
||||||
(uintptr_t)arg);
|
(uintptr_t)arg);
|
||||||
|
|||||||
@@ -133,11 +133,13 @@ EXTERN const pthread_attr_t g_default_pthread_attr;
|
|||||||
* attributes.
|
* attributes.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* trampoline
|
* trampoline - The user space startup function
|
||||||
* thread
|
* thread - The pthread handle to be used
|
||||||
* attr
|
* attr - It points to a pthread_attr_t structure whose contents are
|
||||||
* start_routine
|
* used at thread creation time to determine attributes
|
||||||
* arg
|
* for the new thread
|
||||||
|
* entry - The new thread starts execution by invoking entry
|
||||||
|
* arg - It is passed as the sole argument of entry
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* OK (0) on success; a (non-negated) errno value on failure. The errno
|
* OK (0) on success; a (non-negated) errno value on failure. The errno
|
||||||
@@ -156,7 +158,7 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
|
|||||||
* Terminate execution of a thread started with pthread_create.
|
* Terminate execution of a thread started with pthread_create.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* exit_valie
|
* exit_value
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* None
|
* None
|
||||||
@@ -176,7 +178,7 @@ void nx_pthread_exit(FAR void *exit_value) noreturn_function;
|
|||||||
* within the pthread_exit() and pthread_cancellation() logic
|
* within the pthread_exit() and pthread_cancellation() logic
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* tcb - The TCB of the pthread that is exiting or being canceled.
|
* None
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* None
|
* None
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
* Terminate execution of a thread started with pthread_create.
|
* Terminate execution of a thread started with pthread_create.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* exit_valie
|
* exit_value
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* None
|
* None
|
||||||
|
|||||||
@@ -208,11 +208,13 @@ static void pthread_start(void)
|
|||||||
* attributes.
|
* attributes.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* trampoline
|
* trampoline - The user space startup function
|
||||||
* thread
|
* thread - The pthread handle to be used
|
||||||
* attr
|
* attr - It points to a pthread_attr_t structure whose contents are
|
||||||
* start_routine
|
* used at thread creation time to determine attributes
|
||||||
* arg
|
* for the new thread
|
||||||
|
* entry - The new thread starts execution by invoking entry
|
||||||
|
* arg - It is passed as the sole argument of entry
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* OK (0) on success; a (non-negated) errno value on failure. The errno
|
* OK (0) on success; a (non-negated) errno value on failure. The errno
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
* Terminate execution of a thread started with pthread_create.
|
* Terminate execution of a thread started with pthread_create.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* exit_valie
|
* exit_value
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* None
|
* None
|
||||||
|
|||||||
Reference in New Issue
Block a user