Skip to content

Commit

Permalink
sysdeps/managarm: Implement sys_getcpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwinci committed Oct 20, 2023
1 parent ffea4f0 commit e0b134d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion options/linux/generic/sched.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ int sched_getcpu(void) {
errno = e;
return -1;
}
return 0;
return cpu;
}

int setns(int, int) {
Expand Down
4 changes: 4 additions & 0 deletions sysdeps/managarm/generic/sched.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,9 @@ int sys_setthreadaffinity(pid_t tid, size_t cpusetsize, const cpu_set_t *mask) {
return 0;
}

int sys_getcpu(int *cpu) {
HEL_CHECK(helGetCurrentCpu(cpu));
return 0;
}

}

0 comments on commit e0b134d

Please sign in to comment.