Implement get_robust_list syscall decoder

* linux/dummy.h (sys_get_robust_list): Remove.
* linux/syscall.h (sys_get_robust_list): New prototype.
* process.c (sys_get_robust_list): New function.
This commit is contained in:
Дмитрий Левин 2012-03-11 22:32:26 +00:00
parent 1e8ed076ce
commit 1b0bae2969
3 changed files with 29 additions and 1 deletions

View File

@ -32,7 +32,6 @@
#define sys_add_key printargs
#define sys_fanotify_init printargs
#define sys_fanotify_mark printargs
#define sys_get_robust_list printargs
#define sys_ioperm printargs
#define sys_iopl printargs
#define sys_ioprio_get printargs

View File

@ -88,6 +88,7 @@ int sys_ftruncate64();
int sys_futex();
int sys_futimesat();
int sys_get_mempolicy();
int sys_get_robust_list();
int sys_get_thread_area();
int sys_getcpu();
int sys_getcwd();

View File

@ -2617,6 +2617,34 @@ sys_sched_getaffinity(struct tcb *tcp)
return 0;
}
int
sys_get_robust_list(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]);
} else {
void *addr;
size_t len;
if (syserror(tcp) ||
!tcp->u_arg[1] ||
umove(tcp, tcp->u_arg[1], &addr) < 0) {
tprintf("%#lx, ", tcp->u_arg[1]);
} else {
tprintf("[%p], ", addr);
}
if (syserror(tcp) ||
!tcp->u_arg[2] ||
umove(tcp, tcp->u_arg[2], &len) < 0) {
tprintf("%#lx", tcp->u_arg[2]);
} else {
tprintf("[%lu]", (unsigned long) len);
}
}
return 0;
}
static const struct xlat schedulers[] = {
{ SCHED_OTHER, "SCHED_OTHER" },
{ SCHED_RR, "SCHED_RR" },