diff options
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/types.h | 6 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/include/limits.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/resource.h | 8 |
4 files changed, 19 insertions, 1 deletions
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index aaa0f67f1..3964ae3a9 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -99,6 +99,12 @@ typedef __ino32_t ino_t; #endif #endif /*__ino_t_defined*/ +/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */ +#ifndef __id_t_defined +#define __id_t_defined +typedef unsigned long id_t; +#endif /* __id_t_defined */ + #if defined (__INSIDE_CYGWIN__) struct __flock32 { short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index f81bc2afc..c38fc5520 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -245,12 +245,13 @@ details. */ getlogin_r. 116: Export atoll. 117: Export utmpx functions, Return utmp * from pututent. + 118: Export getpriority, setpriority. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 117 +#define CYGWIN_VERSION_API_MINOR 118 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h index 25136acdf..5ef3513ce 100644 --- a/winsup/cygwin/include/limits.h +++ b/winsup/cygwin/include/limits.h @@ -182,5 +182,8 @@ details. */ #define RTSIG_MAX _POSIX_RTSIG_MAX +/* Used for nice and get/setpriority. */ +#define NZERO 20 + #endif /* _MACH_MACHLIMITS_H_ */ #endif /* _LIMITS_H___ */ diff --git a/winsup/cygwin/include/sys/resource.h b/winsup/cygwin/include/sys/resource.h index c1fe544a9..d2de569cd 100644 --- a/winsup/cygwin/include/sys/resource.h +++ b/winsup/cygwin/include/sys/resource.h @@ -17,6 +17,11 @@ details. */ extern "C" { #endif +/* Used for get/setpriority */ +#define PRIO_PROCESS 0 +#define PRIO_PGRP 1 +#define PRIO_USER 2 + #define RLIMIT_CPU 0 /* CPU time in seconds */ #define RLIMIT_FSIZE 1 /* Maximum filesize */ #define RLIMIT_DATA 2 /* max data size */ @@ -68,6 +73,9 @@ int setrlimit (int __resource, const struct rlimit *__rlp); int getrusage (int __who, struct rusage *__rusage); +int getpriority (int which, id_t who); +int setpriority (int which, id_t who, int value); + #ifdef __cplusplus } #endif |