Skip to content

Commit

Permalink
Fix build break
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Oct 10, 2024
1 parent ec2fe66 commit 0bb37d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions libs/runtime/ebpf_epoch.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ ebpf_epoch_initiate()

// Set the current thread affinity to CPU 0.
// This could fail if the system is preventing the thread from moving to CPU 0.
uintptr_t old_thread_affinity;
return_value = ebpf_set_current_thread_affinity(1 >> 0, &old_thread_affinity);
GROUP_AFFINITY old_thread_affinity;
return_value = ebpf_set_current_thread_cpu_affinity(0, &old_thread_affinity);
if (return_value != EBPF_SUCCESS) {
goto Error;
}
Expand All @@ -365,7 +365,7 @@ ebpf_epoch_initiate()
KeLowerIrql(old_irql);

// Restore the thread affinity. Can't fail at this point.
ebpf_restore_current_thread_affinity(old_thread_affinity);
ebpf_restore_current_thread_cpu_affinity(&old_thread_affinity);

KeInitializeDpc(&_ebpf_epoch_timer_dpc, _ebpf_epoch_timer_worker, NULL);
KeSetTargetProcessorDpc(&_ebpf_epoch_timer_dpc, 0);
Expand Down
6 changes: 3 additions & 3 deletions libs/runtime/unit/platform_unit_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,10 @@ struct scoped_cpu_affinity
{
scoped_cpu_affinity(uint32_t i) : old_affinity_mask(0)
{
REQUIRE(ebpf_set_current_thread_affinity(1ull << i, &old_affinity_mask) == EBPF_SUCCESS);
REQUIRE(ebpf_set_current_thread_cpu_affinity(i, &old_affinity_mask) == EBPF_SUCCESS);
}
~scoped_cpu_affinity() { ebpf_restore_current_thread_affinity(old_affinity_mask); }
uintptr_t old_affinity_mask;
~scoped_cpu_affinity() { ebpf_restore_current_thread_cpu_affinity(&old_affinity_mask); }
GROUP_AFFINITY old_affinity_mask;
};

/**
Expand Down

0 comments on commit 0bb37d0

Please sign in to comment.