forked from xuos/xiuos
optimize code standards
This commit is contained in:
@@ -26,7 +26,7 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
|
||||
{
|
||||
int ret ;
|
||||
int pid ;
|
||||
utask_x task ;
|
||||
UtaskType task ;
|
||||
task.func_entry = start_routine ;
|
||||
task.func_param = arg ;
|
||||
memcpy(task.name , "utask", 6);
|
||||
|
||||
@@ -56,11 +56,11 @@ struct utask
|
||||
int32_t stack_size;
|
||||
uint8_t prio;
|
||||
};
|
||||
typedef struct utask utask_x;
|
||||
typedef struct utask UtaskType;
|
||||
|
||||
typedef void DIR;
|
||||
|
||||
int32_t UserTaskCreate(utask_x utask);
|
||||
int32_t UserTaskCreate(UtaskType utask);
|
||||
|
||||
x_err_t UserTaskStartup(int32_t id);
|
||||
x_err_t UserTaskDelete(int32_t id);
|
||||
@@ -178,8 +178,8 @@ struct utask
|
||||
int32_t stack_size;
|
||||
uint8_t prio;
|
||||
};
|
||||
typedef struct utask utask_x;
|
||||
int32_t UserTaskCreate(utask_x utask);
|
||||
typedef struct utask UtaskType;
|
||||
int32_t UserTaskCreate(UtaskType utask);
|
||||
|
||||
#define UserTaskStartup StartupKTask
|
||||
#define UserTaskDelete KTaskDelete
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*
|
||||
* @return EOK on success; ENOMEMORY/EEMPTY on failure
|
||||
*/
|
||||
int32_t UserTaskCreate(utask_x utask){
|
||||
int32_t UserTaskCreate(UtaskType utask){
|
||||
return (int32_t) KSwitch5(KS_USER_TASK_CREATE,(uintptr_t)utask.name,(uintptr_t)utask.func_entry,(uintptr_t)utask.func_param,(uintptr_t)utask.stack_size,(uintptr_t)utask.prio);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user