~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to system/include/libc/sys/resource.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _SYS_RESOURCE_H_
 
2
#define _SYS_RESOURCE_H_
 
3
 
 
4
#include <sys/time.h>
 
5
 
 
6
#ifdef __cplusplus
 
7
extern "C" {
 
8
#endif
 
9
 
 
10
#define RUSAGE_SELF     0               /* calling process */
 
11
#define RUSAGE_CHILDREN -1              /* terminated child processes */
 
12
 
 
13
struct rusage {
 
14
  struct timeval ru_utime;      /* user time used */
 
15
  struct timeval ru_stime;      /* system time used */
 
16
  /* XXX Emscripten */
 
17
  int            ru_maxrss;
 
18
  int            ru_ixrss;
 
19
  int            ru_idrss;
 
20
  int            ru_isrss;
 
21
  int            ru_minflt;
 
22
  int            ru_majflt;
 
23
  int            ru_nswap;
 
24
  int            ru_inblock;
 
25
  int            ru_oublock;
 
26
  int            ru_msgsnd;
 
27
  int            ru_msgrcv;
 
28
  int            ru_nsignals;
 
29
  int            ru_nvcsw;
 
30
  int            ru_nivcsw;
 
31
};
 
32
 
 
33
/* XXX Emscripten */
 
34
#define PRIO_PROCESS 0
 
35
int getrusage(int who, struct rusage *r_usage);
 
36
 
 
37
/* XXX Emscripten */
 
38
#define RLIMIT_CORE 100
 
39
#define RLIMIT_CPU 1
 
40
#define RLIMIT_DATA 2
 
41
#define RLIMIT_FSIZE 3
 
42
#define RLIMIT_NOFILE 4
 
43
#define RLIMIT_STACK 5
 
44
#define RLIMIT_AS 6
 
45
 
 
46
typedef unsigned rlim_t;
 
47
struct rlimit {
 
48
  rlim_t rlim_cur;
 
49
  rlim_t rlim_max;
 
50
};
 
51
int getrlimit(int resource, struct rlimit *rlim);
 
52
int setrlimit(int resource, const struct rlimit *rlim);
 
53
 
 
54
#ifdef __cplusplus
 
55
}
 
56
#endif
 
57
 
 
58
#endif
 
59