Re: [HACKERS] S_LOCK() change produces error...
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] S_LOCK() change produces error... |
Дата | |
Msg-id | 199801201937.OAA06493@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] S_LOCK() change produces error... (Bruce Momjian <maillist@candle.pha.pa.us>) |
Список | 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@candle.pha.pa.us
В списке pgsql-hackers по дате отправления: