2007-07-23 Ulrich Drepper <drepper@redhat.com>

* process.c (sys_getcpu): New function.
	* linux/syscall.h: Declare sys_getcpu.
	* linux/syscallent.h: Add entry for getcpu.
This commit is contained in:
Roland McGrath 2007-08-02 01:37:55 +00:00
parent e9fcf735af
commit db8319f2fa
3 changed files with 26 additions and 1 deletions

View File

@ -103,6 +103,7 @@ int sys_mbind(), sys_get_mempolicy(), sys_set_mempolicy(), sys_move_pages();
int sys_arch_prctl();
int sys_io_setup(), sys_io_submit(), sys_io_cancel(), sys_io_getevents(), sys_io_destroy();
int sys_utimensat(), sys_epoll_pwait(), sys_signalfd(), sys_timerfd(), sys_eventfd();
int sys_getcpu();
/* sys_socketcall subcalls */

View File

@ -348,7 +348,7 @@
{ 4, TD, printargs, "tee" }, /* 315 */
{ 4, TD, printargs, "vmsplice" }, /* 316 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 317 */
{ 5, 0, printargs, "SYS_318" }, /* 318 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 318 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 320 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */

View File

@ -3325,4 +3325,28 @@ struct tcb *tcp;
}
#endif
int
sys_getcpu(tcp)
struct tcb *tcp;
{
if (exiting(tcp)) {
unsigned u;
if (tcp->u_arg[0] == 0)
tprintf("NULL, ");
else if (umove(tcp, tcp->u_arg[0], &u) < 0)
tprintf("%#lx, ", tcp->u_arg[0]);
else
tprintf("[%u], ", u);
if (tcp->u_arg[1] == 0)
tprintf("NULL, ");
else if (umove(tcp, tcp->u_arg[1], &u) < 0)
tprintf("%#lx, ", tcp->u_arg[1]);
else
tprintf("[%u], ", u);
tprintf("%#lx", tcp->u_arg[2]);
}
return 0;
}
#endif