Alfred Perlstein <[EMAIL PROTECTED]> writes:
> One trick that may help is calling sched_yield(2) on a lock miss,
> it's a POSIX call and quite new so you'd need a 'configure' test
> for it.
The author of the current s_lock code seems to have thought that
select() with a zero delay would do the equivalent of sched_yield().
I'm not sure if that's true on very many kernels, if indeed any...
I doubt we could buy much by depending on sched_yield(); if you want
to assume POSIX facilities, ISTM you might as well go for user-space
semaphores and forget the whole TAS mechanism.
regards, tom lane
- [HACKERS] Assuming that TAS() will succeed the first tim... Tom Lane
- Re: [HACKERS] Assuming that TAS() will succeed the ... Nathan Myers
- Re: [HACKERS] Assuming that TAS() will succeed ... Tom Lane
- Re: [HACKERS] Assuming that TAS() will succ... Nathan Myers
- Re: [HACKERS] Assuming that TAS() will ... Dominic J. Eidson
- Re: [HACKERS] Assuming that TAS() ... Nathan Myers
- Re: [HACKERS] Assuming that TAS() will ... Tom Lane
- Re: [HACKERS] Assuming that TAS() will succ... Alfred Perlstein
- Re: [HACKERS] Assuming that TAS() will ... Tom Lane
- Re: [HACKERS] Assuming that TAS() ... Bruce Momjian
- Re: [HACKERS] Assuming that TA... Alfred Perlstein
- RE: [HACKERS] Assuming that TAS() will succeed the ... Mikheev, Vadim
- Re: [HACKERS] Assuming that TAS() will succeed ... Nathan Myers
- RE: [HACKERS] Assuming that TAS() will succeed the ... Mikheev, Vadim
- Re: [HACKERS] Assuming that TAS() will succeed ... Tom Lane
- Re: [HACKERS] Assuming that TAS() will succ... Bruce Momjian
- Re: [HACKERS] Assuming that TAS() will ... Nathan Myers
- Re: [HACKERS] Assuming that TAS() will ... Tom Lane
- Re: [HACKERS] Assuming that TAS() ... Bruce Momjian
