RtlpWaitForCriticalSection?
Dan Kegel
dank at kegel.com
Thu Jan 23 02:23:07 CST 2003
Christian Costa wrote:
>> All the static CRITICAL_SECTIONs in Wine DLLs have names.
>> The only unnamed ones are those that are initialized at runtime.
>
> It is what I said! No? :-)
I guess I missed part of what you said, sorry.
>> To give these a name, we'd either have to convert them to
>> static initialization, or change InitializeCriticalSection
>> to somehow generate a name from the caller's program counter.
>
>
> What about writing a new macro that initializes the name in the
> CRITICAL_SECTION struct.
> .................
> InitializeCriticalSection(&crit);
> SET_CRITICAL_SECTION_NAME(&crit,"name");
Hmm. Seems to be the Wine DLL sources should try
to avoid stuff that doesn't compile under Windows.
That said, we could provide a header file that
defined SET_CRITICAL_SECTION_NAME in Windows, and
made it do nothing.
Furthermore, we could be real sneaky, and make that header file turn
InitializeCriticalSection into a macro
that called the real InitializeCriticalSection,
then called SET_CRITICAL_SECTION_NAME,
so no source changes would be needed to get the name in there, maybe.
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
More information about the wine-devel
mailing list