Skip to content

Commit

Permalink
Auto merge of #2423 - rtzoeller:dragonfly_sched_getcpu, r=Amanieu
Browse files Browse the repository at this point in the history
DragonFlyBSD supports sched_getcpu()

In addition to `sched_setaffinity()` and `sched_getaffinity()`, DragonFlyBSD also provides a way to check which CPU a thread is currently executing on.
  • Loading branch information
bors committed Sep 26, 2021
2 parents 199e39e + 2985199 commit 310b698
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/unix/bsd/freebsdlike/dragonfly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,7 @@ extern "C" {
pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *mut cpu_set_t) -> ::c_int;
pub fn sched_setaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *const cpu_set_t)
-> ::c_int;
pub fn sched_getcpu() -> ::c_int;
pub fn setproctitle(fmt: *const ::c_char, ...);

pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
Expand Down

0 comments on commit 310b698

Please sign in to comment.