!664 feat: 支持LOS_TaskJoin 和 LOS_TaskDetach
Merge pull request !664 from zhushengle/Join
This commit is contained in:
@@ -106,7 +106,7 @@ extern int SysSetProcessGroupID(unsigned int pid, unsigned int gid);
|
||||
extern unsigned int SysCreateUserThread(const TSK_ENTRY_FUNC func, const UserTaskParam *userParam, bool joinable);
|
||||
extern int SysSetThreadArea(const char *area);
|
||||
extern char *SysGetThreadArea(void);
|
||||
extern int SysUserThreadSetDeatch(unsigned int taskID);
|
||||
extern int SysUserThreadSetDetach(unsigned int taskID);
|
||||
extern int SysUserThreadDetach(unsigned int taskID);
|
||||
extern int SysThreadJoin(unsigned int taskID);
|
||||
extern void SysUserExitGroup(int status);
|
||||
|
||||
@@ -883,9 +883,9 @@ unsigned int SysCreateUserThread(const TSK_ENTRY_FUNC func, const UserTaskParam
|
||||
|
||||
param.pfnTaskEntry = func;
|
||||
if (joinable == TRUE) {
|
||||
param.uwResved = OS_TASK_FLAG_PTHREAD_JOIN;
|
||||
param.uwResved = LOS_TASK_ATTR_JOINABLE;
|
||||
} else {
|
||||
param.uwResved = OS_TASK_FLAG_DETACHED;
|
||||
param.uwResved = LOS_TASK_STATUS_DETACHED;
|
||||
}
|
||||
|
||||
return OsCreateUserTask(OS_INVALID_VALUE, ¶m);
|
||||
@@ -921,7 +921,7 @@ char *SysGetThreadArea(void)
|
||||
return (char *)(OsCurrTaskGet()->userArea);
|
||||
}
|
||||
|
||||
int SysUserThreadSetDeatch(unsigned int taskID)
|
||||
int SysUserThreadSetDetach(unsigned int taskID)
|
||||
{
|
||||
unsigned int intSave;
|
||||
int ret;
|
||||
|
||||
@@ -255,7 +255,7 @@ SYSCALL_HAND_DEF(__NR_shmctl, SysShmCtl, int, ARG_NUM_3)
|
||||
SYSCALL_HAND_DEF(__NR_statx, SysStatx, int, ARG_NUM_5)
|
||||
|
||||
/* LiteOS customized syscalls, not compatible with ARM EABI */
|
||||
SYSCALL_HAND_DEF(__NR_pthread_set_detach, SysUserThreadSetDeatch, int, ARG_NUM_1)
|
||||
SYSCALL_HAND_DEF(__NR_pthread_set_detach, SysUserThreadSetDetach, int, ARG_NUM_1)
|
||||
SYSCALL_HAND_DEF(__NR_pthread_join, SysThreadJoin, int, ARG_NUM_1)
|
||||
SYSCALL_HAND_DEF(__NR_pthread_deatch, SysUserThreadDetach, int, ARG_NUM_1)
|
||||
SYSCALL_HAND_DEF(__NR_creat_user_thread, SysCreateUserThread, unsigned int, ARG_NUM_3)
|
||||
|
||||
Reference in New Issue
Block a user