Hi all. I'm stumped by a problem with OS 5.0 where the PACE environment in that OS does not support SysNotifyBroadcastFromInterrupt() and is inconsistent with a serial wakeup handler (set by SrmSetWakeupHandler). (See copy below of an FAQ taken from the PalmSource KnowledgeBase that details this problem.) As far as I can see I need both these functions for my application to function properly.
My question is: Does anyone know if the SysNotifyBroadcastFromInterrupt() is supported in OS 5.2? Also can someone confirm that the interrupt-driven wakeup handler is fully functional in OS 5.2 as claimed in the FAQ. I'd appreciate any help on this at all since I don't want to invest in a OS5.2 device if it's not going to work. Thanx Steve PS. Do you know if the latest version of the OS 5 Simulator for Windows can now handle interrupt-driven wakeup handlers? ----------------------------------------------------------- PalmSource Knowledge Base search result Answer ID: 413 Answer Type: FAQ Category: Operating System PACE Serial Manager Date Created:01/31/2003 02:18 PM Date Updated:02/19/2003 12:15 PM Question: Palm OS 5 applications may have trouble running at interrupt time Answer 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: 1) SysNotifyBroadcastFromInterrupt is non existent through PACE in Palm OS 5. Developers should check the OS version before they attempt to make this call. 2) 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). For 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 Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/