summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall/rusagesys.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/syscall/rusagesys.c')
-rw-r--r--usr/src/uts/common/syscall/rusagesys.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/usr/src/uts/common/syscall/rusagesys.c b/usr/src/uts/common/syscall/rusagesys.c
index 3e09643981..036500932f 100644
--- a/usr/src/uts/common/syscall/rusagesys.c
+++ b/usr/src/uts/common/syscall/rusagesys.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,6 +34,7 @@
#include <sys/time.h>
#include <sys/errno.h>
#include <sys/resource.h>
+#include <sys/vm_usage.h>
static int
getrusage(void *user_rusage)
@@ -246,16 +246,19 @@ getrusage_lwp(void *user_rusage)
}
int
-rusagesys(int code, void * arg)
+rusagesys(int code, void *arg1, void *arg2, void *arg3, void *arg4)
{
switch (code) {
case _RUSAGESYS_GETRUSAGE:
- return (getrusage(arg));
+ return (getrusage(arg1));
case _RUSAGESYS_GETRUSAGE_CHLD:
- return (getrusage_chld(arg));
+ return (getrusage_chld(arg1));
case _RUSAGESYS_GETRUSAGE_LWP:
- return (getrusage_lwp(arg));
+ return (getrusage_lwp(arg1));
+ case _RUSAGESYS_GETVMUSAGE:
+ return (vm_getusage((uint_t)(uintptr_t)arg1, (time_t)arg2,
+ (vmusage_t *)arg3, (size_t *)arg4));
default:
return (set_errno(EINVAL));
}