Skip to content

Commit 310b698

Browse files
committed
Auto merge of #2423 - rtzoeller:dragonfly_sched_getcpu, r=Amanieu
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.
2 parents 199e39e + 2985199 commit 310b698

File tree

1 file changed

+1
-0
lines changed
  • src/unix/bsd/freebsdlike/dragonfly

1 file changed

+1
-0
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,7 @@ extern "C" {
13901390
pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *mut cpu_set_t) -> ::c_int;
13911391
pub fn sched_setaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *const cpu_set_t)
13921392
-> ::c_int;
1393+
pub fn sched_getcpu() -> ::c_int;
13931394
pub fn setproctitle(fmt: *const ::c_char, ...);
13941395

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

0 commit comments

Comments
 (0)