Hi,
Looking through the mailing list archives, support for threaded
applications wasn't quite clear to me so I ask here. I have a
threaded application working on Red Hat Linux 6.0 which uses pthreads.
I was trying to port it over to FreeBSD 3.3 on a 2 processor intel machine.
Not having done threaded work on FreeBSD before, I need to figure out what
compiler-options/libraries/kernel to use for the port -
a) What do I need to do, to compile an application which uses pthreads
on freebsd 3.3. The gcc (2.7.2.3) man page suggests that it should
be invoked with -pthread. Is that sufficient or do I also need to recompile
the standard libraries with DTHREAD_SAFE? How about with gcc295
(which comes on the 3.3 CD), it doesn't seem to have this option
at all, going by the man page.
b) The mailing list archives seem to suggest that on freebsd (at least
upto 3.2), a (p)thread doesn't map to a kernel thread. I.e scheduling
of (p)threads in a process is done in user space. Is there any way at
all to map a user-level thread to a kernel thread 1:1? Again there seems
to be -kthread option for gcc (2.7.2.3) but none for gcc295.
c) Is the generic 3.3 default kernel threaded and able to run a multiprocessor
machine or do I need to build a custom kernel with specific options.
Sorry my freebsd is a bit rusty as I have been away for more than a year.
Thanks,
--rohit.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message