[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Calling out to C causing hang
From: |
Chris Double |
Subject: |
Re: [Chicken-users] Calling out to C causing hang |
Date: |
Tue, 8 Apr 2003 01:19:53 +1200 |
User-agent: |
KMail/1.4.3 |
On Tue, 08 Apr 2003 01:10, you wrote:
> Not exactly a problem, but you have to make ABSOLUTELY SURE
> that the do_event() (in your example) is a `foreign-callback-lambda[*]'.
> That's essential! `foreign-lambda*' is wrong.
I'm using wrappers generated from SWIG. Here's part of the swig interface:
--------------8<--------------
%module simplex
#{
#}
#include typemaps.i
extern void do_event(void* display);
--------------8<--------------
SWIG seems to generate a C file that describes everything. Here's the relevant
portions for do_event:
static void simplex_wrap_do_event(int,C_word,C_word,C_word) C_noret;
static void simplex_wrap_do_event (int argc, C_word closure, C_word
continuation, C_word scm1) {
C_word resultobj;
void *arg1 = (void *) 0 ;
C_check_for_interrupt;
C_trace("do-event");
swig_convert_ptr(scm1,(void **) &arg1, 0, SWIG_POINTER_EXCEPTION);
do_event(arg1);
resultobj = C_SCHEME_UNDEFINED;
C_kontinue (continuation, resultobj);
}
static void swig_init_helper (C_word continuation) {
...
sym = C_intern (&a, 16, "simplex:do-event");
C_mutate ((C_word*)sym+1, (*a=C_CLOSURE_TYPE|1,
a[1]=(C_word)simplex_wrap_do_event, tmp=(C_word)a, a+=2, tmp));
...
How do I tell if this is doing the right thing?
Chris.
- Re: [Chicken-users] Calling out to C causing hang, (continued)
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang, felix, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang, Tony Garnock-Jones, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang,
Chris Double <=
- [Chicken-users] C hang Solved (was Re: Calling out to C causing hang), Chris Double, 2003/04/07
- [Chicken-users] Re: C hang Solved (was Re: Calling out to C causing hang), Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Re: C hang Solved (was Re: Calling out to C causing hang), Jonah Beckford, 2003/04/07