Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group