Re: Win32 Thread safetyness
От
Andrew - Supernews
Тема
Re: Win32 Thread safetyness
Дата
Msg-id
slrndgqolt.2bu6.andrew+nonews@trinity.supernews.net
Список
Дерево обсуждения
Re: Win32 Thread safetyness Andrew - Supernews <andrew+nonews@supernews.com>
On 2005-08-24, "Dave Page" 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 по дате отправления