Re: Lightweight locking primitive

Поиск
Список
Период
Сортировка
От Matthew Kirkwood
Тема Re: Lightweight locking primitive
Дата
Msg-id Pine.LNX.4.33.0203130043570.3549-100000@sphinx.mythic-beasts.com
обсуждение исходный текст
Ответ на Re: Lightweight locking primitive  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Tue, 12 Mar 2002, Bruce Momjian wrote:

> > They're basically the same thing.  Currently, pthread_mutexes on Linux
> > (implemented in glibc) are fairly gross in the contended case, since
> > there is no clean way to wait for lock release,

> Strange that it doesn't wait for the lock.
[..]

It does wait, in that the call will not return before or unless
the thread has acquired the lock.  However, it waits in an ugly
way, via spin-and-yield or some evil signal or pipe hackery via
a manager thread.

pthread_mutexes are fairly ugly, but they should still be
lightweight.  Until now, there was no way to do that under
Linux.  (I don't know how the other free Unixes do it, but I
suspect it is not much better.)

Matthew.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Help Wanted for running C code
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Lightweight locking primitive