• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <unistd.h>
2 #include <limits.h>
3 #include <errno.h>
4 #include <sys/resource.h>
5 #include <signal.h>
6 #include <sys/sysinfo.h>
7 #include "syscall.h"
8 #include "libc.h"
9 
10 #define JT(x) (-256|(x))
11 #define VER JT(1)
12 #define JT_ARG_MAX JT(2)
13 #define JT_MQ_PRIO_MAX JT(3)
14 #define JT_PAGE_SIZE JT(4)
15 #define JT_SEM_VALUE_MAX JT(5)
16 #define JT_NPROCESSORS_CONF JT(6)
17 #define JT_NPROCESSORS_ONLN JT(7)
18 #define JT_PHYS_PAGES JT(8)
19 #define JT_AVPHYS_PAGES JT(9)
20 #define JT_ZERO JT(10)
21 #define JT_DELAYTIMER_MAX JT(11)
22 
23 #define RLIM(x) (-32768|(RLIMIT_ ## x))
24 
sysconf(int name)25 long sysconf(int name)
26 {
27 	return syscall(SYS_sysconf, name);
28 }
29