Intel® IXP400 Software
Operating System Abstraction Layer (OSAL)
Programmer’s Guide IXP400 Software Version 2.0 April 2005
Document Number: 252539, Revision: 007 321
Table 62. OSAL Core Interface (Sheet 2 of 2)
ixOsalMutexInit initializes a mutex
ixOsalMutexLock locks a mutex
ixOsalMutexUnlock unlocks a mut ex
ixOsalMut exTryLock non- blocking attempt t o lock a mute x
ixOsalM ut exDestroy destroys a mutex object
ixOsalFastMutexInit initializes a fast mutex
ixOsalFas tMutexTr yLock non- blockin g attempt to lock a fa st mutex
ixOsalFastMutexUnlock unlocks a fast mutex
ixOsalFas tMutexDest roy destroys a fa st mutex ob ject
ixOsalSemaphoreInit initializes a semaphore
ixOsalSema ph ore P os t posts to (increm en ts ) a semaphore
ixOsalSemaphoreWait waits on (decrements) a semaphore
ixOsalSem aphoreTryWait non-blocking wait on semaph ore
ixOsalSemaphoreGetValue gets semaphore val ue
ixOsalSemaphoreDestroy destroys a semaphore object
Thread synchronization
ixOsalYiel d yields execution of c urrent thread
ixOsalSleep yielding sleep for a number of
milliseconds
ixOsalBusySleep busy sleep for a number of microseconds
ixOsalTimestampGet value of the t imestamp counter
ixOsalTimestampResolutionGet resolution of the timestamp counter
ixOsalSysClockRateGet system clock rate, in t icks
ixOsalTimeGet current system time
IX_OSAL_TIMEVAL_TO_TICKS converts ixOsalTimeVal int o ticks
IX_OSAL_TICKS_TO_TIMEVAL converts ticks into ixOsalTimeVal
IX_OSAL_TIMEVAL_TO_MS converts ixOsalTimeVal to milliseconds
IX_OSAL_MS_TO_TIMEVAL converts milliseconds to IxOsalTimeval
IX_OSAL_TIME_EQ “equal” comparison for IxOsalTimeval
IX_OSAL_TIME_LT “less than” comparison for IxOsalTimeval
IX_OSAL_TIME_GT “greater than” comparison for
IxOsalTimev al
IX_OSAL_TIME_ADD “add” operator f or IxOsalTimeval
Time
IX_OSAL_TIME_SUB “subtract” operator for IxOsalTimev a l
ixOsalLogLevelSet sets the current logging verbosity level
Logging
ixOsalLog interrupt -safe logging function
ixOsalRepeatingTimerSchedule schedules a repeating timer
ixOsalSingleShotTimerShedule schedules a single-s hot timer
ixOsalTimerCancel cancels a running timer
Timers
ixOsalTimersShow displays all the running timers