Important: The information in this document is obsolete and should not be used for new development.
Functions Callable at Hardware Interrupt Time
Table C-1 lists client functions that you can safely call at hardware interrupt time (from completion routines, VBL tasks, Time Manager tasks, and others), and specifies whether you must call theOTEnterInterruptfunction before calling the function.That these functions are safe to call, however, does not imply that they interact predictably with non-interrupt code. For instance, while it is safe to call the
OTAddFirstfunction at interrupt time, the actual add operation is not atomic, so calling it at interrupt time could adversely affect non-interrupt code processing the same list. Thus, for each function listed in the table, information is also provided as to whether the operation is atomic.
Table C-1 Functions callable at hardware interrupt time, all ISAs
Function Needs OTEnterInterrupt? Atomic OTAcquireLockno yes OTAddFirstno no OTAddLastno no OTAllocMemno n/a OTAtomicAdd16no yes OTAtomicAdd32no yes OTAtomicAdd8no yes OTAtomicClearBitno yes OTAtomicSetBitno yes OTAtomicTestBitno yes OTCancelSystemTaskno n/a OTCanLoadLibrariesyes no OTCanMakeSyncCallyes no OTClearLockno yes OTCompareAndSwap16no yes OTCompareAndSwap32no yes OTCompareAndSwap8no yes OTCompareAndSwapPtrno yes OTCreatePortRefno n/a OTDequeueno yes OTElapsedMicrosecondsno n/a OTElapsedMillisecondsno n/a OTEnqueueno yes OTFindAndRemoveLinkno no OTFindLinkno no OTFreeMemno n/a OTGetBusTypeFromPortRefno n/a OTGetClockTimeInSecsno n/a OTGetDeviceTypeFromPortRefno n/a OTGetFirstno no OTGetIndexedLinkno no OTGetLastno no OTGetSlotFromPortRefno n/a OTGetTimeStampno n/a OTIsAtInterruptLevelno n/a OTIsInListno no OTLIFODequeueno yes OTLIFOEnqueueno yes OTLIFOStealAndReverseListno yes OTLIFOStealListno yes OTMemcmpno n/a OTMemcpyno n/a OTMemmoveno n/a OTMemsetno n/a OTMemzerono n/a OTRemoveFirstno no OTRemoveLastnoc no OTRemoveLinkno no OTReverseListno no OTScheduleDeferredTaskyes n/a OTScheduleInterruptTaskno n/a OTScheduleSystemTaskyes n/a OTSetBusTypeInPortRefno n/a OTSetDeviceTypeInPortRefno n/a OTStrCatno n/a OTStrCopyno n/a OTStrEqualno n/a OTStrLengthno n/a OTSubtractTimeStampsno n/a OTTimeStampInMicrosecondsno n/a OTTimeStampInMillisecondsno n/a OTWhoAmIno n/a