Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to cxplat_get_current_processor_number #3959

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ebpfcore/usersim/EbpfCore_Usersim.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@
<FilesToPackage Include="$(TargetPath)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\external\usersim\cxplat\src\cxplat_winkernel\cxplat_winkernel.vcxproj">
<Project>{1ebe3966-7dc4-49b4-b840-3d33d63415ec}</Project>
<ProjectReference Include="..\..\external\usersim\cxplat\src\cxplat_winuser\cxplat_winuser.vcxproj">
<Project>{f2ca70ab-af9a-47d1-9da9-94d5ab573ac2}</Project>
</ProjectReference>
<ProjectReference Include="..\..\external\usersim\src\usersim.vcxproj">
<Project>{030a7ac6-14dc-45cf-af34-891057ab1402}</Project>
Expand Down Expand Up @@ -236,4 +236,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
7 changes: 6 additions & 1 deletion ebpfcore/usersim/EbpfCore_Usersim.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
<ItemGroup>
<ResourceCompile Include="$(SolutionDir)resource\ebpf_resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion external/usersim
6 changes: 1 addition & 5 deletions libs/runtime/ebpf_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ ebpf_is_preemptible()
uint32_t
ebpf_get_current_cpu()
{
PROCESSOR_NUMBER processor_number;

KeGetCurrentProcessorNumberEx(&processor_number);

return KeGetProcessorIndexFromNumber(&processor_number);
return cxplat_get_current_processor_number();
}

uint64_t
Expand Down
1 change: 1 addition & 0 deletions libs/runtime/ebpf_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ extern "C"
* running on. Only valid if ebpf_is_preemptible() == true.
* @retval Zero based index of CPUs.
*/
EBPF_INLINE_HINT
uint32_t
ebpf_get_current_cpu();

Expand Down
Loading