Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 1 | /** |
| 2 | * This file is intended to provide backward |
| 3 | * compatibility for main osService/OSSL |
| 4 | * APIs. |
| 5 | * |
| 6 | * It shall be phased out gradually and users |
| 7 | * are strongly recommended to use IX_OSAL API. |
| 8 | * |
| 9 | * @par |
| 10 | * IXP400 SW Release version 2.0 |
| 11 | * |
| 12 | * -- Copyright Notice -- |
| 13 | * |
| 14 | * @par |
| 15 | * Copyright 2001-2005, Intel Corporation. |
| 16 | * All rights reserved. |
| 17 | * |
| 18 | * @par |
Wolfgang Denk | c57eadc | 2013-07-28 22:12:47 +0200 | [diff] [blame] | 19 | * SPDX-License-Identifier: BSD-3-Clause |
Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 20 | * @par |
| 21 | * -- End of Copyright Notice -- |
| 22 | */ |
| 23 | |
| 24 | #ifndef IX_OSAL_BACKWARD_OSSERVICES_H |
| 25 | #define IX_OSAL_BACKWARD_OSSERVICES_H |
| 26 | |
| 27 | #ifndef __vxworks |
| 28 | typedef UINT32 IX_IRQ_STATUS; |
| 29 | #else |
| 30 | typedef int IX_IRQ_STATUS; |
| 31 | #endif |
| 32 | |
| 33 | typedef IxOsalMutex IxMutex; |
| 34 | |
| 35 | typedef IxOsalFastMutex IxFastMutex; |
| 36 | |
| 37 | typedef IxOsalVoidFnVoidPtr IxVoidFnVoidPtr; |
| 38 | |
| 39 | typedef IxOsalVoidFnPtr IxVoidFnPtr; |
| 40 | |
| 41 | |
| 42 | #define LOG_NONE IX_OSAL_LOG_LVL_NONE |
| 43 | #define LOG_USER IX_OSAL_LOG_LVL_USER |
| 44 | #define LOG_FATAL IX_OSAL_LOG_LVL_FATAL |
| 45 | #define LOG_ERROR IX_OSAL_LOG_LVL_ERROR |
| 46 | #define LOG_WARNING IX_OSAL_LOG_LVL_WARNING |
| 47 | #define LOG_MESSAGE IX_OSAL_LOG_LVL_MESSAGE |
| 48 | #define LOG_DEBUG1 IX_OSAL_LOG_LVL_DEBUG1 |
| 49 | #define LOG_DEBUG2 IX_OSAL_LOG_LVL_DEBUG2 |
| 50 | #define LOG_DEBUG3 IX_OSAL_LOG_LVL_DEBUG3 |
| 51 | #ifndef __vxworks |
| 52 | #define LOG_ALL IX_OSAL_LOG_LVL_ALL |
| 53 | #endif |
| 54 | |
| 55 | PUBLIC IX_STATUS |
| 56 | ixOsServIntBind (int level, void (*routine) (void *), void *parameter); |
| 57 | |
| 58 | PUBLIC IX_STATUS ixOsServIntUnbind (int level); |
| 59 | |
| 60 | |
| 61 | PUBLIC int ixOsServIntLock (void); |
| 62 | |
| 63 | PUBLIC void ixOsServIntUnlock (int lockKey); |
| 64 | |
| 65 | |
| 66 | PUBLIC int ixOsServIntLevelSet (int level); |
| 67 | |
| 68 | PUBLIC IX_STATUS ixOsServMutexInit (IxMutex * mutex); |
| 69 | |
| 70 | PUBLIC IX_STATUS ixOsServMutexLock (IxMutex * mutex); |
| 71 | |
| 72 | PUBLIC IX_STATUS ixOsServMutexUnlock (IxMutex * mutex); |
| 73 | |
| 74 | PUBLIC IX_STATUS ixOsServMutexDestroy (IxMutex * mutex); |
| 75 | |
| 76 | PUBLIC IX_STATUS ixOsServFastMutexInit (IxFastMutex * mutex); |
| 77 | |
| 78 | PUBLIC IX_STATUS ixOsServFastMutexTryLock (IxFastMutex * mutex); |
| 79 | |
| 80 | PUBLIC IX_STATUS ixOsServFastMutexUnlock (IxFastMutex * mutex); |
| 81 | |
| 82 | PUBLIC int |
| 83 | ixOsServLog (int level, char *format, int arg1, int arg2, int arg3, int arg4, |
| 84 | int arg5, int arg6); |
| 85 | |
| 86 | |
| 87 | PUBLIC int ixOsServLogLevelSet (int level); |
| 88 | |
| 89 | PUBLIC void ixOsServSleep (int microseconds); |
| 90 | |
| 91 | PUBLIC void ixOsServTaskSleep (int milliseconds); |
| 92 | |
| 93 | PUBLIC unsigned int ixOsServTimestampGet (void); |
| 94 | |
| 95 | |
| 96 | PUBLIC void ixOsServUnload (void); |
| 97 | |
| 98 | PUBLIC void ixOsServYield (void); |
| 99 | |
| 100 | #endif |
| 101 | /* IX_OSAL_BACKWARD_OSSERVICES_H */ |