blob: 9a41618066ad785a204fb1a3c122c73e26e9e4b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
/******************************************************************************
*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
/*****************************************************************************/
/* */
/* File Name : osal_handle.h */
/* */
/* Description : This file contains all the necessary structure */
/* declarations use by OSAL library. */
/* */
/* List of Functions : None */
/* */
/* Issues / Problems : None */
/* */
/* Revision History : */
/* */
/* DD MM YYYY Author(s) Changes (Describe the changes made) */
/* 06 03 2006 Ittiam Draft */
/* */
/*****************************************************************************/
#ifndef OSAL_HANDLE_H
#define OSAL_HANDLE_H
/*****************************************************************************/
/* Constant Macros */
/*****************************************************************************/
#define MAX_FDS 40
#define DEBUG_ORDER 100
/*****************************************************************************/
/* Enums */
/*****************************************************************************/
typedef enum
{
CREATED,
DESTROYED,
ERRORED
} DEBUG_STATE_T;
/*****************************************************************************/
/* Typedefs */
/*****************************************************************************/
typedef struct
{
void *handle;
WORD32 state;
} debug_handle_t;
typedef struct
{
debug_handle_t thread_handle[DEBUG_ORDER];
WORD32 thread_count;
debug_handle_t mutex_handle[DEBUG_ORDER];
WORD32 mutex_count;
debug_handle_t mbox_handle[DEBUG_ORDER];
WORD32 mbox_count;
debug_handle_t socket_handle[DEBUG_ORDER];
WORD32 socket_count;
debug_handle_t sem_handle[DEBUG_ORDER];
WORD32 sem_count;
debug_handle_t select_engine_handle[DEBUG_ORDER];
WORD32 select_engine_count;
} osal_debug_t;
typedef struct
{
void *mmr_handle; /* Handle to memory manager */
void *(*alloc)(void *mmr_handle, UWORD32 size); /* Call back for allocation */
void (*free)(void *mmr_handle, void *mem); /* Call back for free */
} osal_t;
#endif /* OSAL_HANDLE_H */
|