From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian) |
Cc: | teunis(at)mauve(dot)computersupportcentre(dot)com, scrappy(at)hub(dot)org, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] S_LOCK() change produces error... |
Date: | 1998-01-20 19:37:24 |
Message-ID: | 199801201937.OAA06493@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > (clip from SMP support in linux' asm/spinlocks.h)
> > #define spin_unlock(lock) \
> > __asm__ __volatile__( \
> > "lock ; btrl $0,%0" \
> > :"=m" (__dummy_lock(lock)))
> >
> > in linux the lock has ";" following.
> > Yep - it's for multiCPU systems (SMP). Handy for shared-memory systems
> > too if you're really into multithreading-speed.
> >
> > It locks that particular byte (word?) of memory against access by other
> > CPU's accessing it IIRC...
> >
> > Perhaps your GAS is too old? (GNU binutils)
> > (does BSD support multiple CPU's under intel?)
> >
> > multiprocessor really isn't that rare under linux - even Linus Torvalds
> > uses a SMP system *grin*...
> >
> > Maybe he encountered a locking problem with a multicpu host and needed a
> > semaphore (or equiv) to lock things? Just trying to figure this out...
> > (sometimes necessary if you're doing shared memory across processes)
>
> Marc, I will try 'lock;' and if it works, will submit a patch.
Yep, it works. Patch applied.
--
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1998-01-20 19:43:51 | Re: [HACKERS] Authentication Woes |
Previous Message | James Hughes | 1998-01-20 19:30:36 | Authentication Woes |