Re: FreeBSD/i386 thread test
От | Manfred Spraul |
---|---|
Тема | Re: FreeBSD/i386 thread test |
Дата | |
Msg-id | 3F5D0011.3050506@colorfullife.com обсуждение исходный текст |
Ответ на | Re: FreeBSD/i386 thread test (Jeroen Ruigrok/asmodai <asmodai@wxs.nl>) |
Ответы |
Re: FreeBSD/i386 thread test
|
Список | pgsql-hackers |
Jeroen Ruigrok/asmodai wrote: >-On [20030908 23:52], Peter Eisentraut (peter_e@gmx.net) wrote: > > >>Why would FreeBSD have a "library of thread-safe libc functions" (libc_r) >>if the functions weren't thread-safe? I think the test is faulty. >> >> A thread-safe library has a per-thread errno value (i.e. errno is a #define to a function call), thread-safe io buffers for stdio, etc. Some of these changes cause a noticable overhead, thus a seperate library for those users who want to avoid that overhead. Reentrancy is independant from _r: If you look at the prototype of gethostbyname(), it's just not possible to make that thread safe with reasonable effort - the C library would have to keep one buffer per thread around. >Having libc_r is not a guarantee that all functions of libc are >represented in that library as thread-safe functions. > >gethostbyname_r() is a notable reentrant function which is absent in >FreeBSD. > > Is there a thread-safe alternate to gethostbyname() for FreeBSD? -- Manfred
В списке pgsql-hackers по дате отправления: