[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 00:56:15 +1200 |
User-agent: |
KMail/1.4.3 |
On Tue, 08 Apr 2003 00:49, you wrote:
>
> BTW, your call-out to C does not perform callbacks, right?
Yes it does. Here's the code I'm calling from Scheme.
void do_event(Display* display)
{
XEvent event;
int i = C_interrupts_enabled;
/* C_interrupts_enabled = 0; */
if(XPending(display))
{
XNextEvent(display, &event);
/* call_handle_event is a Scheme function. If an interrupt occurs
while in there the programs hangs due to constantly performing
a minor gc */
call_handle_event(get_base_window(event.xany.window), event.type);
}
/* C_interrupts_enabled = i; */
}
The call_handle_event is a scheme function:
(define-external (call_handle_event (c-pointer w) (unsigned-long type)) void
...)
If I wrap the function in the C_interrupts_enabled/disabled (ie. uncomment the
relevant lines above) things seem to work fine. This is because
handle_interrupts never gets called I assume.
From your question I'm guessing that there might be a problem with calling
back to scheme?
Chris.
- Re: [Chicken-users] Calling out to C causing hang, (continued)
- Re: [Chicken-users] Calling out to C causing hang, tonyg, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/05
- 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 <=
- 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
- [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