Aaron,
Only functions directly called by the OS need to include the
prologue and epilogue code. The methods the callbacks call
do not need them.
Mmm... make sure that the epilogue code always gets called.
One common mistake with the prologue/epilogue code is this:
Boolean SomeEventHandler (......)
{
CALLBACK_PROLOGUE
switch (event->etype)
{
case someCase:
... // event is handled
return true; // XXX Error!
...
}
CALLBACK_EPILOGUE
return handled;
}
In the above code, CALLBACK_EPILOGUE doesn't get called if
"someCase" is handled, which is an error.
Regards,
-Ade
At 08:33 AM 5/16/99 +0200, Aaron Ardiri wrote:
[...]
> i am using gcc, and i think it might be a callback problem
> acessing global variables.
>
> does anyone know the strict rules of using GCC_PROLOGUE
> and GCC_EPILOGUE?
>
> i am using them in my callbacks (eventhandlers) but not
> inside methods that the callbacks call.. would this be a
> problem?