This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: spinlock class?
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-developers at cygwin dot com
- Date: Mon, 28 Apr 2003 11:15:18 -0400
- Subject: Re: spinlock class?
- References: <3EAD3E9D.9060504@hekimian.com>
- Reply-to: cygwin-developers at cygwin dot com
On Mon, Apr 28, 2003 at 10:45:49AM -0400, Joe Buehler wrote:
>Can someone tell me what the fastest way is in Cygwin to do mutual
>exclusion? I want to do some in-memory logging and disturb timing
>as little as possible.
You mean critical sections, maybe? Although cygwin uses "spinlocks" in
one or two cases, they are only for edge cases that should be hit rarely.
They're basically a 'if (!test) Sleep (0)'.
cgf