We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Windows build number: 10.0.18363.778
The getcpu systemcall always reports that the process is running on core 0.
getcpu
Minimal Example:
#include <iostream> #include <sys/syscall.h> #include <thread> int main(){ for(int i=0; i < 100; i++){ std::thread([]{ std::cout << sched_getcpu(); }).detach(); } return 0; }
Running g++ main.cpp -lpthread && ./a.out always prints a row of 0. On a Linux it prints numbers between 0 and the number of cores of the cpu.
g++ main.cpp -lpthread && ./a.out
0
This is probably the cause of #3294
The text was updated successfully, but these errors were encountered:
That's a great analysis and repro. Yes almost certainly cause of #3294. Better on WSL2.
Sorry, something went wrong.
Are WSL bugs not beeing fixed any more? Is there an official announcement about this?
No branches or pull requests
Windows build number: 10.0.18363.778
The
getcpu
systemcall always reports that the process is running on core 0.Minimal Example:
Running
g++ main.cpp -lpthread && ./a.out
always prints a row of0
. On a Linux it prints numbers between 0 and the number of cores of the cpu.This is probably the cause of #3294
The text was updated successfully, but these errors were encountered: