Merging upstream version 0.7.1 (Closes: #991419).
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
05c588e9d7
commit
9e09e0ef69
99 changed files with 6727 additions and 943 deletions
|
@ -267,13 +267,11 @@ struct affinity {
|
|||
#define AFFINITY_INITIALIZER {0, 0}
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef gettid
|
||||
static pid_t
|
||||
gettid(void)
|
||||
common_gettid(void)
|
||||
{
|
||||
return syscall(__NR_gettid);
|
||||
}
|
||||
#endif /* gettid */
|
||||
|
||||
CK_CC_UNUSED static int
|
||||
aff_iterate(struct affinity *acb)
|
||||
|
@ -285,7 +283,10 @@ aff_iterate(struct affinity *acb)
|
|||
CPU_ZERO(&s);
|
||||
CPU_SET(c % CORES, &s);
|
||||
|
||||
return sched_setaffinity(gettid(), sizeof(s), &s);
|
||||
if (sched_setaffinity(common_gettid(), sizeof(s), &s) != 0)
|
||||
perror("WARNING: Could not affine thread");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CK_CC_UNUSED static int
|
||||
|
@ -297,7 +298,10 @@ aff_iterate_core(struct affinity *acb, unsigned int *core)
|
|||
CPU_ZERO(&s);
|
||||
CPU_SET((*core) % CORES, &s);
|
||||
|
||||
return sched_setaffinity(gettid(), sizeof(s), &s);
|
||||
if (sched_setaffinity(common_gettid(), sizeof(s), &s) != 0)
|
||||
perror("WARNING: Could not affine thread");
|
||||
|
||||
return 0;
|
||||
}
|
||||
#elif defined(__MACH__)
|
||||
CK_CC_UNUSED static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue