Date: Thu, 19 Oct 2000 22:32:23 +0100 From: Steve Dobson <steve.dobson@krasnegar.demon.co.uk> To: freebsd-hackers@freebsd.org Subject: Problems with pthread Message-ID: <20001019223223.A1105@krasnegar.demon.co.uk>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi
First please CC to me as I am not on the hackers mail list.
I am trying to get the ORBacus working for FreeBSD. I know you already have
a port of ORBacus, but that is version 3, and their latest release is version
4. In order to get ORBacus working to it I first need to get their JTC
library working (JTC is a thin wrapper to pthread).
Now that the user threads have re-written I was hoping to get the JTC
library to compile and work under the 4.1 kernel. I have managed to
get it to compile, but it core dumps very early in the start up code of
my application.
I have written a little simple program (attached with its Makefile) that also
exhibits the same problem. When I run the program I see the following
error reported from gdb:
(gdb) run
Starting program: nod
Program received signal SIGSEGV, Segmentation fault.
0x280747b8 in pth_cancel_point () from /usr/local/lib/libpthread.so.13
(gdb)
Can anyone offer any advice.
Steve
--
Steve Dobson steve.dobson@krasnegar.demon.co.uk
People don't usually make the same mistake twice -- they make it three
times, four time, five times...
[-- Attachment #2 --]
#include <stream.h>
#include <pthread.h>
int
main(int argc, char **argv)
{
pthread_mutex_t lock;
cerr << "About to initialise the lock" << endl;
if (pthread_mutex_init(&lock, 0))
{
cerr << "Failed to init the lock" << cout;
return 1;
}
cerr << "About to grab the lock" << endl;
if (pthread_mutex_lock(&lock))
{
cerr << "Failed to grab the lock" << cout;
return 1;
}
cerr << "About to release the lock" << endl;
if (pthread_mutex_unlock(&lock))
{
cerr << "Failed to release the lock" << cout;
return 1;
}
cerr << "All done" << endl;
}
[-- Attachment #3 --]
SRC.cpp = nod.cpp
CPPFLAGS = -I/usr/local/include -D_THREAD_SAFE
CXXFLAGS = -g
LDFLAGS = -L/usr/local/lib -pthread -g
LDLIBS = -lpthread
OBJS = ${SRC.cpp:%.cpp=%.o}
nod: ${OBJS}
${CXX} ${LDFLAGS} -o nod ${OBJS} ${LDLIBS}
clean:
rm -f nod ${OBJS}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001019223223.A1105>
