Pthread struct utility synchronizes with OpenCL