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 [EMAIL PROTECTED]
People don't usually make the same mistake twice -- they make it three
times, four time, five times...
#include
#include
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;
}
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}