There's an interesting item that was in the PalmSource KB, Answer 413 (I
can't verify if it is still there right now - the developer pavilion
appears to be down):

The Palm Application Compatibility Environment (PACE) is not interrupt
safe so 68K applications running through PACE may experience problems if
they attempt to run during an interrupt. A couple of ramifications of
this are:

SysNotifyBroadcastFromInterrupt is non existent through PACE in Palm OS
5. Developers should check the OS version before they attempt to make
this call. 
Serial Wakeup Handlers set with SrmSetWakeupHandler may work
inconsistently under different versions of OS 5 and will not work at all
via the Palm OS 5 Simulator. In general, developers should avoid using
serial wakeup handlers in OS 5. 
**If you do attempt to use wakeup handlers in an OS 5.0 environment note
that they will only work while the application that set the wakeup
handler is still active. This is fixed in OS 5.2, but the wakeup handler
itself should be stored in a memory location separate from the
application (such as copying the function into a FtrPtr and setting the
wakeup handler to this FtrPtr).


example:


//The size of the handler function can be calculated by subtracting the
memory location 
//of the handler function from the next function in your code resource.
sizeOfPatch = (UInt32)((UInt32)&FunctionAfterHandler- (UInt32)
&HandlerFunction);
//allocate a FtrPtr the size of our handler and then copy it in.
FtrPtrNew(appFileCreator, ourFuncFeature, sizeOfPatch, &funcP); 
if (funcP)
{
//copy callback function to the above address.
DmWrite(funcP, 0, (MemPtr)&HandlerFunction, sizeOfPatch);
}




-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to