Fix style.

This commit is contained in:
TXuian
2024-05-22 13:55:30 +08:00
parent f7a232ed4f
commit 2c4fe30bd3
20 changed files with 60 additions and 134 deletions
@@ -221,7 +221,7 @@ struct ThreadStackPointer load_user_stack(struct MemSpace* pmemspace, char** arg
memset(user_stack_init, 0, sizeof(user_stack_init));
uintptr_t argc = 0;
uintptr_t copy_len = 0;
for (argc = 0; argv != NULL && argc < MAX_SUPPORT_PARAMS && argv[argc] != NULL; argc++) {
for (argc = 0; argv != NULL && argc < (MAX_SUPPORT_PARAMS - 1) && argv[argc] != NULL; argc++) {
/// @todo handle with large number of parameters (more than 32)
// copy param to user stack
copy_len = strlen(argv[argc]) + 1;
+2 -2
View File
@@ -99,7 +99,7 @@ static struct Thread* _alloc_task_cb()
return task;
}
int _task_retrieve_sys_resources(struct Thread* ptask)
int _task_return_sys_resources(struct Thread* ptask)
{
assert(ptask != NULL);
@@ -152,7 +152,7 @@ static void _dealloc_task_cb(struct Thread* task)
return;
}
_task_retrieve_sys_resources(task);
_task_return_sys_resources(task);
/* free thread's user stack */
if (task->thread_context.user_stack_idx != -1) {