Improving mutex condition variable management on the touch screen