Dmitry V. Levin
a0bd3749fc
Introduce SYS_FUNC macro to declare and define all syscall parsers. * Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h. (sys_func.h): New rule. * defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros. * linux/syscall.h: Include "sys_func.h". [NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers. Remove other declarations. * linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs and osf_fstatfs syscall parsers. * *.c: Use SYS_FUNC to define syscall parsers.
52 lines
1.0 KiB
C
52 lines
1.0 KiB
C
#include "defs.h"
|
|
|
|
#ifdef OR1K
|
|
|
|
#define OR1K_ATOMIC_SWAP 1
|
|
#define OR1K_ATOMIC_CMPXCHG 2
|
|
#define OR1K_ATOMIC_XCHG 3
|
|
#define OR1K_ATOMIC_ADD 4
|
|
#define OR1K_ATOMIC_DECPOS 5
|
|
#define OR1K_ATOMIC_AND 6
|
|
#define OR1K_ATOMIC_OR 7
|
|
#define OR1K_ATOMIC_UMAX 8
|
|
#define OR1K_ATOMIC_UMIN 9
|
|
|
|
#include "xlat/atomic_ops.h"
|
|
|
|
SYS_FUNC(or1k_atomic)
|
|
{
|
|
if (entering(tcp)) {
|
|
printxval(atomic_ops, tcp->u_arg[0], "???");
|
|
switch(tcp->u_arg[0]) {
|
|
case OR1K_ATOMIC_SWAP:
|
|
tprintf(", 0x%lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
|
|
break;
|
|
case OR1K_ATOMIC_CMPXCHG:
|
|
tprintf(", 0x%lx, %#lx, %#lx", tcp->u_arg[1], tcp->u_arg[2],
|
|
tcp->u_arg[3]);
|
|
break;
|
|
|
|
case OR1K_ATOMIC_XCHG:
|
|
case OR1K_ATOMIC_ADD:
|
|
case OR1K_ATOMIC_AND:
|
|
case OR1K_ATOMIC_OR:
|
|
case OR1K_ATOMIC_UMAX:
|
|
case OR1K_ATOMIC_UMIN:
|
|
tprintf(", 0x%lx, %#lx", tcp->u_arg[1], tcp->u_arg[2]);
|
|
break;
|
|
|
|
case OR1K_ATOMIC_DECPOS:
|
|
tprintf(", 0x%lx", tcp->u_arg[1]);
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
return RVAL_HEX;
|
|
}
|
|
|
|
#endif /* OR1K */
|