git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/libc - Flush stdout on getchar
[tpg/acess2.git]
/
AcessNative
/
ld-acess_src
/
syscalls.c
diff --git
a/AcessNative/ld-acess_src/syscalls.c
b/AcessNative/ld-acess_src/syscalls.c
index
c649f28
..
43dfe26
100644
(file)
--- a/
AcessNative/ld-acess_src/syscalls.c
+++ b/
AcessNative/ld-acess_src/syscalls.c
@@
-14,15
+14,9
@@
#endif
#include "request.h"
#endif
#include "request.h"
-#if SYSCALL_TRACE
-#define DEBUG(str, x...) Debug(str, x)
-#else
-#define DEBUG(...) do{}while(0)
-#endif
-
#define assert(cnd) do{ \
if( !(cnd) ) { \
#define assert(cnd) do{ \
if( !(cnd) ) { \
- fprintf(stderr, "%s:%i - assert failed - " #cnd, __FILE__, __LINE__);\
+ fprintf(stderr, "%s:%i - assert failed - " #cnd
"\n"
, __FILE__, __LINE__);\
exit(-1); \
} \
}while(0)
exit(-1); \
} \
}while(0)
@@
-32,6
+26,7
@@
// === Types ===
// === IMPORTS ===
// === Types ===
// === IMPORTS ===
+extern int gbSyscallDebugEnabled;
// === GLOBALS ===
FILE *gaSyscall_LocalFPs[MAX_FPS];
// === GLOBALS ===
FILE *gaSyscall_LocalFPs[MAX_FPS];
@@
-249,7
+244,7
@@
uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...)
exit(127);
}
exit(127);
}
-
Debug("req->NParams = %i", req->NParams)
;
+
dataPtr = (void*)&req->Params[req->NParams]
;
assert(req->NParams >= 2);
// return
assert(req->Params[0].Type == ARG_TYPE_INT64);
assert(req->NParams >= 2);
// return
assert(req->Params[0].Type == ARG_TYPE_INT64);
@@
-286,7
+281,9
@@
uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...)
free( req );
free( retPtrs );
free( req );
free( retPtrs );
- DEBUG(": %i 0x%llx", SyscallID, retValue);
+ if( gbSyscallDebugEnabled ) {
+ SYSTRACE(": %i 0x%llx", SyscallID, retValue);
+ }
return retValue;
}
return retValue;
}
UCC
git Repository :: git.ucc.asn.au