|
63 | 63 | }
|
64 | 64 |
|
65 | 65 | // 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 | + |
66 | 83 | pub enum schduler_mode {
|
67 | 84 | SCHEDULER_MODE_LOW_LATENCY,
|
68 | 85 | SCHEDULER_MODE_POWER_SAVING,
|
@@ -861,6 +878,13 @@ extern "C" {
|
861 | 878 |
|
862 | 879 | pub fn rename_thread(thread: thread_id, newName: *const ::c_char) -> status_t;
|
863 | 880 | 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; |
864 | 888 | pub fn exit_thread(status: status_t);
|
865 | 889 | pub fn wait_for_thread(thread: thread_id, returnValue: *mut status_t) -> status_t;
|
866 | 890 | pub fn on_exit_thread(callback: extern "C" fn(*mut ::c_void), data: *mut ::c_void) -> status_t;
|
|
0 commit comments