summaryrefslogtreecommitdiff
path: root/src/util/u_thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/u_thread.h')
-rw-r--r--src/util/u_thread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index 8366bfb6d49..a4c73cce884 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -142,7 +142,7 @@ util_set_thread_affinity(thrd_t thread,
if (pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset) != 0)
return false;
- memset(old_mask, 0, num_mask_bits / 32);
+ memset(old_mask, 0, num_mask_bits / 8);
for (unsigned i = 0; i < num_mask_bits && i < CPU_SETSIZE; i++) {
if (CPU_ISSET(i, &cpuset))
old_mask[i / 32] |= 1u << (i % 32);
@@ -167,7 +167,7 @@ util_set_thread_affinity(thrd_t thread,
return false;
if (old_mask) {
- memset(old_mask, 0, num_mask_bits / 32);
+ memset(old_mask, 0, num_mask_bits / 8);
old_mask[0] = m;
#ifdef _WIN64