blob: 761779d885dad985c55a59a75cbc374d718b12be [file] [log] [blame]
Wolfgang Denk4646d2a2006-05-30 15:56:48 +02001/**
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 Denkc57eadc2013-07-28 22:12:47 +020019 * SPDX-License-Identifier: BSD-3-Clause
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020020 * @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
28typedef UINT32 IX_IRQ_STATUS;
29#else
30typedef int IX_IRQ_STATUS;
31#endif
32
33typedef IxOsalMutex IxMutex;
34
35typedef IxOsalFastMutex IxFastMutex;
36
37typedef IxOsalVoidFnVoidPtr IxVoidFnVoidPtr;
38
39typedef 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
55PUBLIC IX_STATUS
56ixOsServIntBind (int level, void (*routine) (void *), void *parameter);
57
58PUBLIC IX_STATUS ixOsServIntUnbind (int level);
59
60
61PUBLIC int ixOsServIntLock (void);
62
63PUBLIC void ixOsServIntUnlock (int lockKey);
64
65
66PUBLIC int ixOsServIntLevelSet (int level);
67
68PUBLIC IX_STATUS ixOsServMutexInit (IxMutex * mutex);
69
70PUBLIC IX_STATUS ixOsServMutexLock (IxMutex * mutex);
71
72PUBLIC IX_STATUS ixOsServMutexUnlock (IxMutex * mutex);
73
74PUBLIC IX_STATUS ixOsServMutexDestroy (IxMutex * mutex);
75
76PUBLIC IX_STATUS ixOsServFastMutexInit (IxFastMutex * mutex);
77
78PUBLIC IX_STATUS ixOsServFastMutexTryLock (IxFastMutex * mutex);
79
80PUBLIC IX_STATUS ixOsServFastMutexUnlock (IxFastMutex * mutex);
81
82PUBLIC int
83ixOsServLog (int level, char *format, int arg1, int arg2, int arg3, int arg4,
84 int arg5, int arg6);
85
86
87PUBLIC int ixOsServLogLevelSet (int level);
88
89PUBLIC void ixOsServSleep (int microseconds);
90
91PUBLIC void ixOsServTaskSleep (int milliseconds);
92
93PUBLIC unsigned int ixOsServTimestampGet (void);
94
95
96PUBLIC void ixOsServUnload (void);
97
98PUBLIC void ixOsServYield (void);
99
100#endif
101/* IX_OSAL_BACKWARD_OSSERVICES_H */