~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/resource.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _UAPI_LINUX_RESOURCE_H
  3 #define _UAPI_LINUX_RESOURCE_H
  4 
  5 #include <linux/time_types.h>
  6 #include <linux/types.h>
  7 
  8 /*
  9  * Resource control/accounting header file for linux
 10  */
 11 
 12 /*
 13  * Definition of struct rusage taken from BSD 4.3 Reno
 14  * 
 15  * We don't support all of these yet, but we might as well have them....
 16  * Otherwise, each time we add new items, programs which depend on this
 17  * structure will lose.  This reduces the chances of that happening.
 18  */
 19 #define RUSAGE_SELF     0
 20 #define RUSAGE_CHILDREN (-1)
 21 #define RUSAGE_BOTH     (-2)            /* sys_wait4() uses this */
 22 #define RUSAGE_THREAD   1               /* only the calling thread */
 23 
 24 struct  rusage {
 25         struct __kernel_old_timeval ru_utime;   /* user time used */
 26         struct __kernel_old_timeval ru_stime;   /* system time used */
 27         __kernel_long_t ru_maxrss;      /* maximum resident set size */
 28         __kernel_long_t ru_ixrss;       /* integral shared memory size */
 29         __kernel_long_t ru_idrss;       /* integral unshared data size */
 30         __kernel_long_t ru_isrss;       /* integral unshared stack size */
 31         __kernel_long_t ru_minflt;      /* page reclaims */
 32         __kernel_long_t ru_majflt;      /* page faults */
 33         __kernel_long_t ru_nswap;       /* swaps */
 34         __kernel_long_t ru_inblock;     /* block input operations */
 35         __kernel_long_t ru_oublock;     /* block output operations */
 36         __kernel_long_t ru_msgsnd;      /* messages sent */
 37         __kernel_long_t ru_msgrcv;      /* messages received */
 38         __kernel_long_t ru_nsignals;    /* signals received */
 39         __kernel_long_t ru_nvcsw;       /* voluntary context switches */
 40         __kernel_long_t ru_nivcsw;      /* involuntary " */
 41 };
 42 
 43 struct rlimit {
 44         __kernel_ulong_t        rlim_cur;
 45         __kernel_ulong_t        rlim_max;
 46 };
 47 
 48 #define RLIM64_INFINITY         (~0ULL)
 49 
 50 struct rlimit64 {
 51         __u64 rlim_cur;
 52         __u64 rlim_max;
 53 };
 54 
 55 #define PRIO_MIN        (-20)
 56 #define PRIO_MAX        20
 57 
 58 #define PRIO_PROCESS    0
 59 #define PRIO_PGRP       1
 60 #define PRIO_USER       2
 61 
 62 /*
 63  * Limit the stack by to some sane default: root can always
 64  * increase this limit if needed..  8MB seems reasonable.
 65  */
 66 #define _STK_LIM        (8*1024*1024)
 67 
 68 /*
 69  * Limit the amount of locked memory by some sane default:
 70  * root can always increase this limit if needed.
 71  *
 72  * The main use-cases are (1) preventing sensitive memory
 73  * from being swapped; (2) real-time operations; (3) via
 74  * IOURING_REGISTER_BUFFERS.
 75  *
 76  * The first two don't need much. The latter will take as
 77  * much as it can get. 8MB is a reasonably sane default.
 78  */
 79 #define MLOCK_LIMIT     (8*1024*1024)
 80 
 81 /*
 82  * Due to binary compatibility, the actual resource numbers
 83  * may be different for different linux versions..
 84  */
 85 #include <asm/resource.h>
 86 
 87 
 88 #endif /* _UAPI_LINUX_RESOURCE_H */
 89 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php