// Alignment Check
if( (Uint)Ptr & (sizeof(Uint)-1) ) {
- Warning("free - Passed a non-aligned address (%p)\n", Ptr);
+ Warning("free - Passed a non-aligned address (%p)", Ptr);
return;
}
// Check memory block - Header
head = (void*)( (Uint)Ptr - sizeof(tHeapHead) );
if(head->Magic == MAGIC_FREE) {
- Warning("free - Passed a freed block (%p)\n", head);
+ Warning("free - Passed a freed block (%p) by %p", head, __builtin_return_address(0));
return;
}
if(head->Magic != MAGIC_USED) {
* AcessOS Microkernel Version
* syscalls.c
*/
-#define DEBUG 0
+#define DEBUG 1
#include <common.h>
#include <syscalls.h>
Uint64 ret = 0;
Uint err = 0;
#if DEBUG
- ENTER("iThread iNum", gCurrentThread->TID, Regs->Num);
+ ENTER("iThread iNum", Threads_GetTID(), Regs->Num);
if(Regs->Num < NUM_SYSCALLS)
LOG("Syscall %s", cSYSCALL_NAMES[Regs->Num]);
LOG("Arg1: 0x%x, Arg2: 0x%x, Arg3: 0x%x", Regs->Arg1, Regs->Arg2, Regs->Arg3);