summaryrefslogtreecommitdiff
path: root/os/windows
diff options
context:
space:
mode:
Diffstat (limited to 'os/windows')
-rw-r--r--os/windows/cpu-affinity.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/os/windows/cpu-affinity.c b/os/windows/cpu-affinity.c
index 69997b24..4ac32ed1 100644
--- a/os/windows/cpu-affinity.c
+++ b/os/windows/cpu-affinity.c
@@ -83,7 +83,7 @@ unsigned int cpus_online(void)
static void print_mask(os_cpu_mask_t *cpumask)
{
for (int i = 0; i < FIO_CPU_MASK_ROWS; i++)
- dprint(FD_PROCESS, "cpumask[%d]=%lu\n", i, cpumask->row[i]);
+ dprint(FD_PROCESS, "cpumask[%d]=%" PRIu64 "\n", i, cpumask->row[i]);
}
/* Return the index of the least significant set CPU in cpumask or -1 if no
@@ -99,7 +99,7 @@ int first_set_cpu(os_cpu_mask_t *cpumask)
int row_first_cpu;
row_first_cpu = __builtin_ffsll(cpumask->row[row]) - 1;
- dprint(FD_PROCESS, "row_first_cpu=%d cpumask->row[%d]=%lu\n",
+ dprint(FD_PROCESS, "row_first_cpu=%d cpumask->row[%d]=%" PRIu64 "\n",
row_first_cpu, row, cpumask->row[row]);
if (row_first_cpu > -1) {
mask_first_cpu = cpus_offset + row_first_cpu;
@@ -136,7 +136,7 @@ static int last_set_cpu(os_cpu_mask_t *cpumask)
row_last_cpu++;
}
- dprint(FD_PROCESS, "row_last_cpu=%d cpumask->row[%d]=%lu\n",
+ dprint(FD_PROCESS, "row_last_cpu=%d cpumask->row[%d]=%" PRIu64 "\n",
row_last_cpu, row, cpumask->row[row]);
if (row_last_cpu > -1) {
mask_last_cpu = cpus_offset + row_last_cpu;
@@ -213,13 +213,17 @@ static int mask_to_group_mask(os_cpu_mask_t *cpumask, int *processor_group, uint
needed_shift = FIO_CPU_MASK_STRIDE - bit_offset;
needed_mask_shift = FIO_CPU_MASK_STRIDE - needed;
needed_mask = (uint64_t)-1 >> needed_mask_shift;
- dprint(FD_PROCESS, "bit_offset=%d end=%d needed=%d needed_shift=%d needed_mask=%ld needed_mask_shift=%d\n", bit_offset, end, needed, needed_shift, needed_mask, needed_mask_shift);
+ dprint(FD_PROCESS,
+ "bit_offset=%d end=%d needed=%d needed_shift=%d needed_mask=%" PRIu64 "needed_mask_shift=%d\n",
+ bit_offset, end, needed, needed_shift, needed_mask,
+ needed_mask_shift);
group_cpumask |= (cpumask->row[row + 1] & needed_mask) << needed_shift;
}
group_cpumask &= (uint64_t)-1 >> (FIO_CPU_MASK_STRIDE - group_size);
/* Return group and mask */
- dprint(FD_PROCESS, "Returning group=%d group_mask=%lu\n", group, group_cpumask);
+ dprint(FD_PROCESS, "Returning group=%d group_mask=%" PRIu64 "\n",
+ group, group_cpumask);
*processor_group = group;
*affinity_mask = group_cpumask;
@@ -329,7 +333,7 @@ int fio_getaffinity(int pid, os_cpu_mask_t *mask)
goto err;
}
if (!GetProcessAffinityMask(handle, &process_mask, &system_mask)) {
- log_err("%s: GetProcessAffinityMask() failed for pid\n",
+ log_err("%s: GetProcessAffinityMask() failed for pid %d\n",
__func__, pid);
goto err;
}