e_comp_wl: boost main thread when trylock failed in input-thread
This patch solves the problem of performance degradation of
the input-thread due to CPU contention in the main thread.
AS-IS :
- If the main thread locks the flush_mutex and becomes runnable status
due to CPU contention, the input-threads will not be able to successfully
lock the flush_mutex that the main thread has already locked.
- The main thread has normal priority so it can stay runnable status
for quite some time.
- As long as the main thread remains runnable status, the input-thread
cannot immediately flush events.
TO-BE :
- The input-thread checks for success or failure using g_mutex_trylock
instead of g_mutex_lock for flush_mutex.
- There is no difference in behavior when trylock succeeds as before.
- When trylock fails, the input-thread boosts the main thread so that
flush_mutex can be unlocked.
- After the main thread unlocks and the input-thread successfully locks,
input-thread clears boosting of the main thread immediately.
Change-Id: Iaf814e343afafad34715be1a3fe4f4d09cc02b1a
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>