bc2d75fa05
- the userland call is now made to PM only, and PM relays the call to other servers as appropriate; this is an ABI change that will ultimately allow us to add proper support for wait3() and the like; for the moment there is backward compatibility; - the getrusage-specific kernel subcall has been removed, as it provided only redundant functionality, and did not provide the means to be extended correctly in the future - namely, allowing the kernel to return different values depending on whether resource usage of the caller (self) or its children was requested; - VM is now told whether resource usage of the caller (self) or its children is requested, and it refrains from filling in wrong values for information it does not have; - VM now uses the correct unit for the ru_maxrss values; - VFS is cut out of the loop entirely, since it does not provide any values at the moment; a comment explains how it should be readded. Change-Id: I27b0f488437dec3d8e784721c67b03f2f853120f
18 lines
340 B
C
18 lines
340 B
C
|
|
#include "syslib.h"
|
|
#include <string.h>
|
|
#include <minix/vm.h>
|
|
|
|
int
|
|
vm_getrusage(endpoint_t endpt, void * addr, int children)
|
|
{
|
|
message m;
|
|
|
|
memset(&m, 0, sizeof(m));
|
|
m.m_lsys_vm_rusage.endpt = endpt;
|
|
m.m_lsys_vm_rusage.addr = (vir_bytes)addr;
|
|
m.m_lsys_vm_rusage.children = children;
|
|
|
|
return _taskcall(VM_PROC_NR, VM_GETRUSAGE, &m);
|
|
}
|