minix/servers/vm/vmproc.h
Xiaoguang Sun 64f10ee644 Implement getrusage
Implement getrusage.
These fields of struct rusage are not supported and always set to zero at this time
long ru_nswap;           /* swaps */
long ru_inblock;         /* block input operations */
long ru_oublock;         /* block output operations */
long ru_msgsnd;          /* messages sent */
long ru_msgrcv;          /* messages received */
long ru_nvcsw;           /* voluntary context switches */
long ru_nivcsw;          /* involuntary context switches */

test75.c is the unit test for this new function

Change-Id: I3f1eb69de1fce90d087d76773b09021fc6106539
2013-07-01 23:00:47 +02:00

39 lines
891 B
C

#ifndef _VMPROC_H
#define _VMPROC_H 1
#include <minix/bitmap.h>
#include <machine/archtypes.h>
#include "pt.h"
#include "vm.h"
#include "regionavl.h"
struct vmproc;
struct vmproc {
int vm_flags;
endpoint_t vm_endpoint;
pt_t vm_pt; /* page table data */
struct boot_image *vm_boot; /* if boot time process */
/* Regions in virtual address space. */
region_avl vm_regions_avl;
vir_bytes vm_region_top; /* highest vaddr last inserted */
bitchunk_t vm_call_mask[VM_CALL_MASK_SIZE];
int vm_slot; /* process table slot */
#if VMSTATS
int vm_bytecopies;
#endif
vir_bytes vm_total;
vir_bytes vm_total_max;
u64_t vm_minor_page_fault;
u64_t vm_major_page_fault;
};
/* Bits for vm_flags */
#define VMF_INUSE 0x001 /* slot contains a process */
#define VMF_EXITING 0x002 /* PM is cleaning up this process */
#define VMF_WATCHEXIT 0x008 /* Store in queryexit table */
#endif