Browse Source

sys/resource.h: add PRIO_MIN and PRIO_MAX for getpriority and setpriority

These constants are not specified by POSIX, but they are in the reserved
namespace, glibc and bsd systems seem to provide them as well.
(Note that POSIX specifies -NZERO and NZERO-1 to be the limits, but
PRIO_MAX equals NZERO)
Szabolcs Nagy 11 năm trước cách đây
mục cha
commit
90710df5cc
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      include/sys/resource.h

+ 3 - 0
include/sys/resource.h

@@ -59,6 +59,9 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
 #define prlimit64 prlimit
 #endif
 
+#define PRIO_MIN (-20)
+#define PRIO_MAX 20
+
 #define PRIO_PROCESS 0
 #define PRIO_PGRP    1
 #define PRIO_USER    2