This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Patch for Review: PR/9254 and other Win32 Threading Fixes
- From: Adam Megacz <gcj at lists dot megacz dot com>
- To: java at gcc dot gnu dot org
- Date: 28 Jan 2003 12:01:58 -0800
- Subject: Re: Patch for Review: PR/9254 and other Win32 Threading Fixes
- Organization: Myself
- References: <BAY1-F47ryWtIIZS2TR0001b4c9@hotmail.com>
"Ranjit Mathew" <rmathew@hotmail.com> writes:
> Right, so I would get to know if I'm not the owner of the critical
> section if TryEnterCriticalSection( ) fails, but if it succeeds,
> I'll have to use LeaveCriticalSection( ) *twice* to prevent
> SNAFU-ing up (ref. MSDN). That would, IMHO, make the code a bit
> weird to read.
Okay, that's cool.
BTW, does it make sense for the platform-independent code to implement
mutex ownership? Or are there platforms where the OS can answer the
query "which thread is holding mutex X"?
- a