Page MenuHomeFreeBSD

D38677.id117618.diff
No OneTemporary

D38677.id117618.diff

Index: lib/libc/gen/sched_getaffinity.c
===================================================================
--- lib/libc/gen/sched_getaffinity.c
+++ lib/libc/gen/sched_getaffinity.c
@@ -38,9 +38,11 @@
sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset)
{
cpuwhich_t which;
- int error;
+ int error, osrel;
- if (__getosreldate() < P_OSREL_TIDPID) {
+ osrel = __getosreldate();
+ if (osrel < P_OSREL_TIDPID_13 || (osrel < P_OSREL_TIDPID &&
+ P_OSREL_MAJOR(osrel) == P_OSREL_MAJOR(P_OSREL_TIDPID))) {
if (pid == 0 || pid > _PID_MAX)
which = CPU_WHICH_TID;
else
Index: lib/libc/gen/sched_setaffinity.c
===================================================================
--- lib/libc/gen/sched_setaffinity.c
+++ lib/libc/gen/sched_setaffinity.c
@@ -41,10 +41,12 @@
static int mp_maxid;
cpuwhich_t which;
cpuset_t c;
- int error, lbs, cpu;
+ int error, lbs, cpu, osrel;
size_t len, sz;
- if (__getosreldate() < P_OSREL_TIDPID) {
+ osrel = __getosreldate();
+ if (osrel < P_OSREL_TIDPID_13 || (osrel < P_OSREL_TIDPID &&
+ P_OSREL_MAJOR(osrel) == P_OSREL_MAJOR(P_OSREL_TIDPID))) {
if (pid == 0 || pid > _PID_MAX)
which = CPU_WHICH_TID;
else
Index: sys/sys/param.h
===================================================================
--- sys/sys/param.h
+++ sys/sys/param.h
@@ -92,6 +92,7 @@
#define P_OSREL_CK_INODE 1300005
#define P_OSREL_POWERPC_NEW_AUX_ARGS 1300070
#define P_OSREL_TIDPID 1400079
+#define P_OSREL_TIDPID_13 1302501
#define P_OSREL_MAJOR(x) ((x) / 100000)
#endif

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 15, 5:58 AM (17 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28729082
Default Alt Text
D38677.id117618.diff (1 KB)

Event Timeline