#ifndef _SYS_RESOURCE_H
#define _SYS_RESOURCE_H
#include <config/types.h>
#include <sys/cdefs.h>
#include <sys/time.h>
typedef __haiku_addr_t rlim_t;
struct rlimit {
rlim_t rlim_cur;
rlim_t rlim_max;
};
#define RLIMIT_CORE 0
#define RLIMIT_CPU 1
#define RLIMIT_DATA 2
#define RLIMIT_FSIZE 3
#define RLIMIT_NOFILE 4
#define RLIMIT_STACK 5
#define RLIMIT_AS 6
#define RLIMIT_NOVMON 7
#define RLIM_NLIMITS 8
#define RLIM_INFINITY (0xffffffffUL)
#define RLIM_SAVED_MAX RLIM_INFINITY
#define RLIM_SAVED_CUR RLIM_INFINITY
struct rusage {
struct timeval ru_utime;
struct timeval ru_stime;
long ru_maxrss;
long ru_ixrss;
long ru_idrss;
long ru_isrss;
long ru_minflt;
long ru_majflt;
long ru_nswap;
long ru_inblock;
long ru_oublock;
long ru_msgsnd;
long ru_msgrcv;
long ru_nsignals;
long ru_nvcsw;
long ru_nivcsw;
};
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN -1
#define PRIO_PROCESS 0
#define PRIO_PGRP 1
#define PRIO_USER 2
__BEGIN_DECLS
extern int getrusage(int who, struct rusage *rusage);
extern int getrlimit(int resource, struct rlimit * rlp);
extern int setrlimit(int resource, const struct rlimit * rlp);
extern int getpriority(int which, id_t who);
extern int setpriority(int which, id_t who, int priority);
__END_DECLS
#endif