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 theOTEnterInterrupt
function 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
OTAddFirst
function 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 OTAcquireLock
no yes OTAddFirst
no no OTAddLast
no no OTAllocMem
no n/a OTAtomicAdd16
no yes OTAtomicAdd32
no yes OTAtomicAdd8
no yes OTAtomicClearBit
no yes OTAtomicSetBit
no yes OTAtomicTestBit
no yes OTCancelSystemTask
no n/a OTCanLoadLibraries
yes no OTCanMakeSyncCall
yes no OTClearLock
no yes OTCompareAndSwap16
no yes OTCompareAndSwap32
no yes OTCompareAndSwap8
no yes OTCompareAndSwapPtr
no yes OTCreatePortRef
no n/a OTDequeue
no yes OTElapsedMicroseconds
no n/a OTElapsedMilliseconds
no n/a OTEnqueue
no yes OTFindAndRemoveLink
no no OTFindLink
no no OTFreeMem
no n/a OTGetBusTypeFromPortRef
no n/a OTGetClockTimeInSecs
no n/a OTGetDeviceTypeFromPortRef
no n/a OTGetFirst
no no OTGetIndexedLink
no no OTGetLast
no no OTGetSlotFromPortRef
no n/a OTGetTimeStamp
no n/a OTIsAtInterruptLevel
no n/a OTIsInList
no no OTLIFODequeue
no yes OTLIFOEnqueue
no yes OTLIFOStealAndReverseList
no yes OTLIFOStealList
no yes OTMemcmp
no n/a OTMemcpy
no n/a OTMemmove
no n/a OTMemset
no n/a OTMemzero
no n/a OTRemoveFirst
no no OTRemoveLast
noc no OTRemoveLink
no no OTReverseList
no no OTScheduleDeferredTask
yes n/a OTScheduleInterruptTask
no n/a OTScheduleSystemTask
yes n/a OTSetBusTypeInPortRef
no n/a OTSetDeviceTypeInPortRef
no n/a OTStrCat
no n/a OTStrCopy
no n/a OTStrEqual
no n/a OTStrLength
no n/a OTSubtractTimeStamps
no n/a OTTimeStampInMicroseconds
no n/a OTTimeStampInMilliseconds
no n/a OTWhoAmI
no n/a