Skip to content

Commit 5fefaf6

Browse files
committed
Auto merge of #2386 - devnexen:haiku_image_api_upd, r=JohnTitor
haiku couple of missing scheduling related fn
2 parents 54fca81 + 23e8e1d commit 5fefaf6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/unix/haiku/native.rs

+24
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,23 @@ e! {
6363
}
6464

6565
// kernel/scheduler.h
66+
67+
pub enum be_task_flags {
68+
B_DEFAULT_MEDIA_PRIORITY = 0x000,
69+
B_OFFLINE_PROCESSING = 0x001,
70+
B_STATUS_RENDERING = 0x002,
71+
B_USER_INPUT_HANDLING = 0x004,
72+
B_LIVE_VIDEO_MANIPULATION = 0x008,
73+
B_VIDEO_PLAYBACK = 0x010,
74+
B_VIDEO_RECORDING = 0x020,
75+
B_LIVE_AUDIO_MANIPULATION = 0x040,
76+
B_AUDIO_PLAYBACK = 0x080,
77+
B_AUDIO_RECORDING = 0x100,
78+
B_LIVE_3D_RENDERING = 0x200,
79+
B_NUMBER_CRUNCHING = 0x400,
80+
B_MIDI_PROCESSING = 0x800,
81+
}
82+
6683
pub enum schduler_mode {
6784
SCHEDULER_MODE_LOW_LATENCY,
6885
SCHEDULER_MODE_POWER_SAVING,
@@ -861,6 +878,13 @@ extern "C" {
861878

862879
pub fn rename_thread(thread: thread_id, newName: *const ::c_char) -> status_t;
863880
pub fn set_thread_priority(thread: thread_id, newPriority: i32) -> status_t;
881+
pub fn suggest_thread_priority(
882+
task_flags: be_task_flags,
883+
period: i32,
884+
jitter: ::bigtime_t,
885+
length: ::bigtime_t,
886+
) -> i32;
887+
pub fn estimate_max_scheduling_latency(th: ::thread_id) -> ::bigtime_t;
864888
pub fn exit_thread(status: status_t);
865889
pub fn wait_for_thread(thread: thread_id, returnValue: *mut status_t) -> status_t;
866890
pub fn on_exit_thread(callback: extern "C" fn(*mut ::c_void), data: *mut ::c_void) -> status_t;

0 commit comments

Comments
 (0)