summaryrefslogtreecommitdiff
path: root/src/egl/drivers/xdri
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-07-10 15:28:55 +0800
committerBrian Paul <brianp@vmware.com>2009-08-24 11:46:15 -0600
commit17090cf3efb0db8fa01b502a9c0df27cbd1a67da (patch)
tree60b29d7e22a9326b8747dbb4a3d5fa495b9b758c /src/egl/drivers/xdri
parent3076d1617db67d49ff773096123c1fa47af58272 (diff)
glapi: Fix a possible race in getting current context/dispatch.
There is a possbile race that _glapi_Context is reset by another thread after it is tested in GET_CURRENT_CONTEXT but before it is returned. We definitely do not want a lock here to solve the race. To have correct results even under a race, no other threads should reset _glapi_Context (or _glapi_Dispatch). This patch adds a new global variable _glapi_SingleThreaded. Since _glapi_Context or _glapi_Dispatch are no longer reset, _glapi_SingleThreaded is tested instead, before accessing them. DRI drivers compiled with this patch applied will not work with existing libGL.so because of the missing new symbol. If this turns out to be a real problem, this patch should be reverted. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'src/egl/drivers/xdri')
0 files changed, 0 insertions, 0 deletions