Re: Assuming that TAS() will succeed the first time is verboten

From: ncm(at)zembu(dot)com (Nathan Myers)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Assuming that TAS() will succeed the first time is verboten
Date: 2000-12-29 00:10:30
Message-ID: 20001228161030.P10336@store.zembu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 28, 2000 at 05:26:23PM -0600, Dominic J. Eidson wrote:
> On Thu, 28 Dec 2000, Nathan Myers wrote:
>
> > The code is based on some odd assumptions. A select() with 0 delay
> > returns immediately unless there is an interrupt during its (very short!)
>
> If you look closely, it's a select with a 2 second timeout.
>
> >>> { 2, 0 }

I don't see that in src/backend/storage/buffer/s_lock.c:

delay.tv_sec = 0;
delay.tv_usec = s_spincycle[spin % S_NSPINCYCLE];
(void) select(0, NULL, NULL, NULL, &delay);

Nathan Myers
ncm(at)zembu(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Kirkpatrick 2000-12-29 01:55:30 Re: [HACKERS] Re: Tuple-valued datums on Alpha (was Re: 7.1 on DEC/Alpha)
Previous Message Dominic J. Eidson 2000-12-28 23:26:23 Re: Assuming that TAS() will succeed the first time is verboten