Fix alloc.c as per #386, define INVALID_ constants and rename malloc to alloc as per #325

Some of the INVALID_ are likely erroneously placed, due to lack of documentation
This commit is contained in:
nullableVoidPtr
2018-11-29 19:24:28 +08:00
parent 1b33ad6c26
commit 3909b6408c
148 changed files with 1116 additions and 1108 deletions

View File

@@ -19,7 +19,7 @@ void ResetTasks(void)
gTasks[i].func = TaskDummy;
gTasks[i].prev = i;
gTasks[i].next = i + 1;
gTasks[i].priority = -1;
gTasks[i].priority = INVALID_S8;
memset(gTasks[i].data, 0, sizeof(gTasks[i].data));
}
@@ -186,7 +186,7 @@ u8 FindTaskIdByFunc(TaskFunc func)
if (gTasks[i].isActive == TRUE && gTasks[i].func == func)
return (u8)i;
return -1;
return INVALID_U8;
}
u8 GetTaskCount(void)