Wine's critical sections and reccursive enter...

Lionel Ulmer lionel.ulmer at free.fr
Mon May 26 07:13:31 CDT 2003


Hi all,

To clean-up a bit the mess that was in the D3D GL critical section handling,
I removed all the code that handles these kind of situations :

function A :
  ENTER_GL();
  some_code
  LEAVE_GL();
  
function B:
  ENTER_GL();
  some_code
  LEAVE_GL();
  call A
  ENTER_GL();
  some_code
  LEAVE_GL();

So we actually went out of the critical section when we knew that it was
acquired again by function A... As, according to MSDN, the crit. sections
are actually 'recursive' (ie that you need to leave them X times if you
entered them X times and that entering an already held crit. section does
not lock the application), I removed all the extraneous LEAVE / ENTER call
around already protected functions (which is much nicer to the eye).

The problem is that with that change, I start to get all sorts of time-outs
of the X11 critical section.

So are Wine's internal critical sections (like the X11 one) really recursive ?

        Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/



More information about the wine-devel mailing list