Re: problems with threads in a shared object
- From: Tristan Van Berkom <tvb gnome org>
- To: Luka Napotnik <luka napotnik gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: problems with threads in a shared object
- Date: Tue, 08 Aug 2006 09:58:54 -0400
Luka Napotnik wrote:
I have a program that imports plugins via dlopen and dlsym(). In those
plugins I use functions like g_mutex_lock to lock a variable, declared in
the main program. But when getting to the mutex function the whole program
crashes.
The .so library is compiled with:
gcc -g -O0 -shared `pkg-config --libs --cflags gtk+-2.0 glib-2.0
gthread-2.0` rr.c -o rr.so
What's wrong?
Good question, did you initialize the threading library ? what did the
stack trace clue you into ? what was the state of the mutex variable
when you attempted to lock it ? unlocked, locked... uncreated ?
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]