diff options
author | Fernando Carrijo <fcarrijo@yahoo.com.br> | 2010-08-01 15:07:22 -0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-08-02 19:38:00 +0300 |
commit | 63294dfa98037e6176deec7e888849a6b37031f2 (patch) | |
tree | 89c34d79a13b06bce00abe35369128bbaf005cee | |
parent | 708f96c332a849694501d6b39acce64dd327ac39 (diff) |
os: inputthread: remove the function AdjustThreadScheduling
We may want to use this later but git can easily bring back for us.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | os/inputthread.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/os/inputthread.c b/os/inputthread.c index 2e4628294..be2d9de7e 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -80,42 +80,6 @@ AddEnabledDeviceThreaded(int fd, void (*f)(void *), void *closure) } /* - * Input events routed through another thread/process can have bad effects on - * latency because we can't guarantee that it will get scheduled at the right - * moment. Although this is hard to see happening with the current - * implementation, we must design something to avoid it. One way to improve - * the responsiveness is to give a high priority to the input thread and also - * adjust the CPU scheduling. - * A detailed discussion can be found here: - * http://vignatti.wordpress.com/2008/08/07/priorities-and-scheduling-hints-for-x-server-threads/ - * - * TODO: incorporate this with cgroup, a feature which allows to limit the - * amount of CPU time real-time processes and threads may consume. - */ -#if 0 -static void -AdjustThreadScheduling(int tid) -{ - struct sched_param param; - int policy = SCHED_FIFO; - - - pthread_t p_tid = pthread_self(); - - param.sched_priority = sched_get_priority_max(policy); - - if (pthread_setschedparam(p_tid, policy, ¶m) != 0) - perror("error setting thread scheduling"); - -#ifdef THREAD_DEBUG - sched_getparam(tid, ¶m); - ErrorF("thread %d: policy: %d, priority: %d\n", tid, - sched_getscheduler(tid_generation), param.sched_priority); -#endif -} -#endif - -/* * @return exit code for the child process which currently is none. The child * process exits only when the main thread (parent) send a signal or a * fatal error occurs. @@ -130,8 +94,6 @@ WaitForInput(void* argument) tid_generation = syscall(__NR_gettid); - /* AdjustThreadScheduling(tid_generation); */ - FD_ZERO(&InputDevices); /* The "communication channel" between the input and main thread */ |