Skip to content

Commit 3c6c414

Browse files
committed
haiku update adding kernel scheduler api.
1 parent 2261e1a commit 3c6c414

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3204,6 +3204,7 @@ fn test_haiku(target: &str) {
32043204
"kernel/fs_query.h",
32053205
"kernel/fs_volume.h",
32063206
"kernel/image.h",
3207+
"kernel/scheduler.h",
32073208
"storage/StorageDefs.h",
32083209
"support/Errors.h",
32093210
"support/SupportDefs.h",

src/unix/haiku/native.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ e! {
6161
B_ADD_ON_IMAGE,
6262
B_SYSTEM_IMAGE
6363
}
64+
65+
// kernel/scheduler.h
66+
pub enum schduler_mode {
67+
SCHEDULER_MODE_LOW_LATENCY,
68+
SCHEDULER_MODE_POWER_SAVING,
69+
}
6470
}
6571

6672
s! {
@@ -744,6 +750,9 @@ extern "C" {
744750

745751
pub fn find_thread(name: *const ::c_char) -> thread_id;
746752

753+
pub fn get_scheduler_mode() -> i32;
754+
pub fn set_scheduler_mode(mode: i32) -> status_t;
755+
747756
pub fn send_data(
748757
thread: thread_id,
749758
code: i32,

0 commit comments

Comments
 (0)