Callback from threaded c-library
From: Kim Karlsson (kimdotkarlsson_at_lucdotac.be)
Date: 02/21/05
- Next message: Michael Gillis: "Re: Install Picks Wrong Dir for Include Files"
- Previous message: Ravi: "remote keyboard and mouse IO"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 21 Feb 2005 14:18:04 +0100
Hi all,
I am using Perl 5.8.0, using Red Hat 9 with a 2.6.9 kernel on a dual-Xeon
machine,
and I shared object I need to use. This shared object has a working thread
which calls a callback when it has finished working.
I have written an extension (following the instructions (the one with the
FH) in
http://www.tfug.org/helpdesk/perl/pod/perlcall.html#Strategies_for_storing_Calback_)
in Perl to access this shared object.
The problem I have is that if the thread calls the callback (to a Perl
sub), I get a segmentation fault. If the callback is called before the
thread starts executing, it all works fine. If I use a C program to setup
the callback and have the thread call the callback, it all works. Thus it
seems there is something going wrong with Perl.
The odd thing is that it crashes -before- it enters the private C function
that calls the Perl sub.
Are there any knows issues with Perl and external threads that I don't
know about, or does anyone know what I can do ?
Cheers,
-Kim
- Next message: Michael Gillis: "Re: Install Picks Wrong Dir for Include Files"
- Previous message: Ravi: "remote keyboard and mouse IO"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|