Skip to content

Commit 3c1279e

Browse files
committed
consistently use cpu_mask_t in sched_getaffinity
1 parent 7153985 commit 3c1279e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easybuild/tools/systemtools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def sched_getaffinity():
169169
pid = os.getpid()
170170

171171
cpu_setsize = 1024 # Max number of CPUs currently detectable
172-
max_cpu_setsize = ctypes.c_ulong(-1).value // 4 # (INT_MAX / 2)
172+
max_cpu_setsize = cpu_mask_t(-1).value // 4 # (INT_MAX / 2)
173173
# Limit it to something reasonable but still big enough
174174
max_cpu_setsize = min(max_cpu_setsize, 1e9)
175175
while cpu_setsize < max_cpu_setsize:

0 commit comments

Comments
 (0)