Move the gpgpu struct from cl_command_queue to thread specific context
authorJunyan He <junyan.he@linux.intel.com>
Thu, 7 Nov 2013 16:58:00 +0000 (00:58 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 8 Nov 2013 05:10:50 +0000 (13:10 +0800)
commita4c180730d072e3178f63a1f6b8dc6d4a402ecc3
tree27d4bb9fe6f3326adab68200d6131ffbd5857aeb
parent8d693257caca457eace1bd235c14e615b1e46e89
Move the gpgpu struct from cl_command_queue to thread specific context

We find some cases will use multi-threads to run on the same queue,
executing the same kernel. This will cause the gpgpu struct which
is very important for GPU context setting be destroyed because we
do not implement any sync protect on it now.
Move the gpgpu struct into thread specific space will fix this problem
because the lib_drm will do the GPU command serialization for us.

Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: "Zou, Nanhai" <nanhai.zou@intel.com>
src/CMakeLists.txt
src/cl_command_queue.c
src/cl_command_queue.h
src/cl_command_queue_gen7.c
src/cl_event.c
src/cl_thread.c [new file with mode: 0644]
src/cl_thread.h [new file with mode: 0644]
utests/CMakeLists.txt