Re: Our "fallback" atomics implementation doesn't actually work

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Our "fallback" atomics implementation doesn't actually work
Дата
Msg-id
22591.1475691757@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Our "fallback" atomics implementation doesn't actually work Tom Lane <tgl@sss.pgh.pa.us>
Re: Our "fallback" atomics implementation doesn't actually work Andres Freund <andres@anarazel.de>
Re: Our "fallback" atomics implementation doesn't actually work Tom Lane <tgl@sss.pgh.pa.us>
Re: Our "fallback" atomics implementation doesn't actually work Andres Freund <andres@anarazel.de>
Re: Our "fallback" atomics implementation doesn't actually work Tom Lane <tgl@sss.pgh.pa.us>
Re: Our "fallback" atomics implementation doesn't actually work Andres Freund <andres@anarazel.de>
Re: Our "fallback" atomics implementation doesn't actually work Tom Lane <tgl@sss.pgh.pa.us>
Re: Our "fallback" atomics implementation doesn't actually work Andres Freund <andres@anarazel.de>
Re: Our "fallback" atomics implementation doesn't actually work Tom Lane <tgl@sss.pgh.pa.us>
Re: Our "fallback" atomics implementation doesn't actually work Andres Freund <andres@anarazel.de>
Re: Our "fallback" atomics implementation doesn't actually work Tom Lane <tgl@sss.pgh.pa.us>
Re: Our "fallback" atomics implementation doesn't actually work Andres Freund <andres@anarazel.de>
Andres Freund  writes:
> On 2016-10-05 14:01:05 -0400, Tom Lane wrote:
>> configure USE_UNNAMED_POSIX_SEMAPHORES=1 --disable-cassert --disable-spinlocks --disable-atomics

> Pretty independent from the complaint at hand, but if I just do that I get
> undefined reference to symbol 'sem_post@@GLIBC_2.2.5'

> I needed to add -pthread -lrt to LDFLAGS to make it work.

Yeah, on my machine man sem_init specifies "Link with -lrt or -pthread".
But I see -lrt getting added into the backend link anyway, presumably
as a result of one of these configure calls:

AC_SEARCH_LIBS(shm_open, rt)
AC_SEARCH_LIBS(shm_unlink, rt)
AC_SEARCH_LIBS(sched_yield, rt)

If we were to try to support USE_UNNAMED_POSIX_SEMAPHORES as default
(which is where I'm thinking about going) we'd have to tweak configure
to check sem_init similarly.
		regards, tom lane


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Andres Freund
Дата:
FAQ