2 * This file is intended to provide backward
3 * compatibility for main osService/OSSL
6 * It shall be phased out gradually and users
7 * are strongly recommended to use IX_OSAL API.
10 * IXP400 SW Release version 2.0
12 * -- Copyright Notice --
15 * Copyright 2001-2005, Intel Corporation.
16 * All rights reserved.
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in the
26 * documentation and/or other materials provided with the distribution.
27 * 3. Neither the name of the Intel Corporation nor the names of its contributors
28 * may be used to endorse or promote products derived from this software
29 * without specific prior written permission.
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
33 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
36 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45 * -- End of Copyright Notice --
48 #ifndef IX_OSAL_BACKWARD_OSSERVICES_H
49 #define IX_OSAL_BACKWARD_OSSERVICES_H
52 typedef UINT32 IX_IRQ_STATUS
;
54 typedef int IX_IRQ_STATUS
;
57 typedef IxOsalMutex IxMutex
;
59 typedef IxOsalFastMutex IxFastMutex
;
61 typedef IxOsalVoidFnVoidPtr IxVoidFnVoidPtr
;
63 typedef IxOsalVoidFnPtr IxVoidFnPtr
;
66 #define LOG_NONE IX_OSAL_LOG_LVL_NONE
67 #define LOG_USER IX_OSAL_LOG_LVL_USER
68 #define LOG_FATAL IX_OSAL_LOG_LVL_FATAL
69 #define LOG_ERROR IX_OSAL_LOG_LVL_ERROR
70 #define LOG_WARNING IX_OSAL_LOG_LVL_WARNING
71 #define LOG_MESSAGE IX_OSAL_LOG_LVL_MESSAGE
72 #define LOG_DEBUG1 IX_OSAL_LOG_LVL_DEBUG1
73 #define LOG_DEBUG2 IX_OSAL_LOG_LVL_DEBUG2
74 #define LOG_DEBUG3 IX_OSAL_LOG_LVL_DEBUG3
76 #define LOG_ALL IX_OSAL_LOG_LVL_ALL
80 ixOsServIntBind (int level
, void (*routine
) (void *), void *parameter
);
82 PUBLIC IX_STATUS
ixOsServIntUnbind (int level
);
85 PUBLIC
int ixOsServIntLock (void);
87 PUBLIC
void ixOsServIntUnlock (int lockKey
);
90 PUBLIC
int ixOsServIntLevelSet (int level
);
92 PUBLIC IX_STATUS
ixOsServMutexInit (IxMutex
* mutex
);
94 PUBLIC IX_STATUS
ixOsServMutexLock (IxMutex
* mutex
);
96 PUBLIC IX_STATUS
ixOsServMutexUnlock (IxMutex
* mutex
);
98 PUBLIC IX_STATUS
ixOsServMutexDestroy (IxMutex
* mutex
);
100 PUBLIC IX_STATUS
ixOsServFastMutexInit (IxFastMutex
* mutex
);
102 PUBLIC IX_STATUS
ixOsServFastMutexTryLock (IxFastMutex
* mutex
);
104 PUBLIC IX_STATUS
ixOsServFastMutexUnlock (IxFastMutex
* mutex
);
107 ixOsServLog (int level
, char *format
, int arg1
, int arg2
, int arg3
, int arg4
,
111 PUBLIC
int ixOsServLogLevelSet (int level
);
113 PUBLIC
void ixOsServSleep (int microseconds
);
115 PUBLIC
void ixOsServTaskSleep (int milliseconds
);
117 PUBLIC
unsigned int ixOsServTimestampGet (void);
120 PUBLIC
void ixOsServUnload (void);
122 PUBLIC
void ixOsServYield (void);
125 /* IX_OSAL_BACKWARD_OSSERVICES_H */