RE: [GD-General] profiling multi threaded applications
Brought to you by:
vexxed72
From: Lewin, G. <gl...@ea...> - 2005-07-20 20:56:08
|
That shouldn't be a problem, I assumed your START and END pairs can be nested. From MSDN: =20 After a thread has ownership of a critical section, it can make additional calls to EnterCriticalSection or TryEnterCriticalSection without blocking its execution. This prevents a thread from deadlocking itself while waiting for a critical section that it already owns. The thread enters the critical section each time EnterCriticalSection and TryEnterCriticalSection succeed. A thread must call LeaveCriticalSection once for each time that it entered the critical section. > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Andras Balogh > Sent: Wednesday, July 20, 2005 1:50 PM > To: gam...@li... > Subject: Re: [GD-General] profiling multi threaded applications >=20 > Yeah, I have something similiar, except that it's=20 > hierarchical, so START and END can be nested, in which case=20 > it gets a bit trickier to use CriticalSections, but I think I=20 > could give that a try! >=20 > thx, >=20 > Andras >=20 > Lewin, Gareth wrote: > > You could have your START and END macros (I assume you use=20 > something=20 > > like that) include EnterCriticalSection and LeaveCriticalSection >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >=20 |