| From | Sent On | Attachments |
|---|---|---|
| Karl H. Beckers | Feb 4, 2008 3:50 am | |
| Dag-Erling Smørgrav | Feb 4, 2008 7:08 am | |
| John Baldwin | Feb 4, 2008 7:25 am | |
| Karl H. Beckers | Feb 4, 2008 8:05 am | |
| Daniel Eischen | Feb 4, 2008 8:16 am | |
| Daniel Eischen | Feb 4, 2008 8:22 am | |
| Dag-Erling Smørgrav | Feb 4, 2008 8:49 am | |
| Dag-Erling Smørgrav | Feb 4, 2008 9:00 am | |
| Daniel Eischen | Feb 4, 2008 9:01 am | |
| Dag-Erling Smørgrav | Feb 4, 2008 9:09 am | |
| Daniel Eischen | Feb 4, 2008 9:13 am | |
| Karl H. Beckers | Feb 4, 2008 9:22 am | |
| Dag-Erling Smørgrav | Feb 4, 2008 9:46 am | |
| Julian Elischer | Feb 4, 2008 10:16 am | |
| Karl H. Beckers | Feb 4, 2008 3:05 pm | |
| John Baldwin | Feb 4, 2008 3:16 pm | |
| Dag-Erling Smørgrav | Feb 5, 2008 12:25 am | |
| Dag-Erling Smørgrav | Feb 5, 2008 12:38 am |
| Subject: | threading in FreeBSD (acx_pthreads) | |
|---|---|---|
| From: | Daniel Eischen (deis...@freebsd.org) | |
| Date: | Feb 4, 2008 8:16:03 am | |
| List: | org.freebsd.freebsd-threads | |
On Mon, 4 Feb 2008, Karl H. Beckers wrote:
Thanks so far,
acx_pthread is this autoconf m4 macro: http://ac-archive.sourceforge.net/ac-archive/acx_pthread.html
I don't see anything wrong with that macro. If I understand it correctly, it should work on FreeBSD and pick up "-pthread".
It looks rather promising. And while I might copy it over and fix it locally, I would like to escalate this upstream, if the algorithm there is wrong. Either way, I'd need to know what the correct way is. What I understood now is: On current versions -lpthread should work. On some older versions I should be using -lthr (so not -lc_r, then?).
No, do not use -lpthread. Refer to John Baldwin's response, -pthread is what you should be using. Also, our ports system allows one to override -pthread (the default) with PTHREAD_LIBS and PTHREAD_CFLAGS. I suspect that part of the macro came from us (FreeBSD). Please do not escalate anything upstream without checking with our ports team, as it looks like the m4 macro has already been adjusted for FreeBSD.
Is there a safe way to check whether we're running a version that needs -lthr? In the varnish example you provided, I cannot find a check for it?!?
-- DE





