diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-06-27 19:32:16 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-06-27 19:32:16 +0000 |
commit | 33deddac8844eaafb850e4a219ed6a1e34ab54e5 (patch) | |
tree | 93a7eeec02dfd2cb200eb414a2fbd245e01c1062 /proc/main.c | |
parent | 603de9d3e2af2ae724e576c4cbf960c8e006b42c (diff) |
Formerly main.c.~9~
Diffstat (limited to 'proc/main.c')
-rw-r--r-- | proc/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/proc/main.c b/proc/main.c index 67c6b78a..82599d95 100644 --- a/proc/main.c +++ b/proc/main.c @@ -52,6 +52,7 @@ main (int argc, char **argv, char **envp) mach_port_t boot; mach_port_t authhandle; error_t err; + mach_port_t pset, psetcntl; initialize_version_info (); @@ -81,6 +82,20 @@ main (int argc, char **argv, char **envp) self_proc->p_argv = (int) argv; self_proc->p_envp = (int) envp; + /* Give ourselves good scheduling performance, because we are so + important. */ + err = thread_get_assignment (mach_thread_self (), &pset); + assert (!err); + err = host_processor_set_priv (master_host_port, pset, &psetcntl); + assert (!err); + thread_max_priority (mach_thread_self (), psetcntl, 0); + assert (!err); + err = task_priority (mach_task_self (), 0, 1); + assert (!err); + + mach_port_deallocate (mach_task_self (), pset); + mach_port_deallocate (mach_task_self (), psetcntl); + while (1) mach_msg_server (message_demuxer, 0, request_portset); } |