Re: Win32 Thread safetyness

Поиск
Список
Период
Сортировка
От Andrew - Supernews
Тема Re: Win32 Thread safetyness
Дата
Msg-id slrndgqolt.2bu6.andrew+nonews@trinity.supernews.net
обсуждение исходный текст
Ответ на Win32 Thread safetyness  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgsql-hackers
On 2005-08-24, "Dave Page" <dpage@vale-housing.co.uk> wrote:
> Which relates to:
>
> static unsigned long
> pq_threadidcallback(void)
> {
>     return (unsigned long) pthread_self();
> }

This is an abuse of pthread_t - it is explicitly not guaranteed in the spec
that pthread_t is an integer type, or even a scalar type; it's permitted to
be a structure. The only valid operations on pthread_t values are assignment
and passing to functions (including pthread_equal() for equality comparison).

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: TODO questions
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: TODO list comments