SysLink API Reference
2.21.03.11
Main Page
Data Structures
Files
Related Pages
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
ti
syslink
utils
List.h
Go to the documentation of this file.
1
9
/*
10
* ============================================================================
11
*
12
* Copyright (c) 2008-2012, Texas Instruments Incorporated
13
*
14
* Redistribution and use in source and binary forms, with or without
15
* modification, are permitted provided that the following conditions
16
* are met:
17
*
18
* * Redistributions of source code must retain the above copyright
19
* notice, this list of conditions and the following disclaimer.
20
*
21
* * Redistributions in binary form must reproduce the above copyright
22
* notice, this list of conditions and the following disclaimer in the
23
* documentation and/or other materials provided with the distribution.
24
*
25
* * Neither the name of Texas Instruments Incorporated nor the names of
26
* its contributors may be used to endorse or promote products derived
27
* from this software without specific prior written permission.
28
*
29
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
31
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
33
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
36
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
37
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
38
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
39
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
* Contact information for paper mail:
41
* Texas Instruments
42
* Post Office Box 655303
43
* Dallas, Texas 75265
44
* Contact information:
45
* http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
46
* DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
47
* ============================================================================
48
*
49
*/
50
51
52
53
#ifndef LIST_H_0XB734
54
#define LIST_H_0XB734
55
56
57
58
#if defined (__cplusplus)
59
extern
"C"
{
60
#endif
61
62
63
/* =============================================================================
64
* Macros and types
65
* =============================================================================
66
*/
71
#define List_traverse(x,y) for(x = (List_Elem *)((List_Object *)y)->elem.next; \
72
(UInt32) x != (UInt32)&((List_Object *)y)->elem;\
73
x = x->next)
74
78
typedef
struct
List_Elem_tag
{
79
struct
List_Elem_tag
*
next
;
80
struct
List_Elem_tag
*
prev
;
81
}
List_Elem
;
82
86
typedef
struct
List_Object_tag
{
87
List_Elem
elem
;
89
}
List_Object
;
90
92
typedef
List_Object
*
List_Handle
;
93
97
typedef
struct
List_Params_tag
{
98
UInt32
temp
;
99
}
List_Params
;
100
101
102
/* =============================================================================
103
* APIs
104
* =============================================================================
105
*/
114
Void
List_Params_init
(
List_Params
* params);
115
127
List_Handle
List_create
(
List_Params
* params,
Error_Block
*eb);
128
136
Void
List_delete
(List_Handle * handlePtr);
137
149
Void
List_construct
(
List_Object
* obj,
List_Params
* params);
150
158
Void
List_destruct
(
List_Object
* obj);
159
167
Void
List_elemClear
(
List_Elem
* elem);
168
179
Bool
List_empty
(List_Handle handle);
180
191
Ptr
List_get
(List_Handle handle);
192
201
Void
List_put
(List_Handle handle,
List_Elem
* elem);
202
215
Ptr
List_next
(List_Handle handle,
List_Elem
* elem);
216
229
Ptr
List_prev
(List_Handle handle,
List_Elem
* elem);
230
241
Void
List_insert
(List_Handle handle,
List_Elem
* newElem,
List_Elem
* curElem);
242
251
Void
List_remove
(List_Handle handle,
List_Elem
* elem);
252
261
Void
List_putHead
(List_Handle handle,
List_Elem
* elem);
262
273
Ptr
List_dequeue
(List_Handle handle);
274
283
Void
List_enqueue
(List_Handle handle,
List_Elem
* elem);
284
293
Void
List_enqueueHead
(List_Handle handle,
List_Elem
* elem);
294
295
296
#if defined (__cplusplus)
297
}
298
#endif
/* defined (__cplusplus) */
299
300
301
#endif
/* LIST_H_0XB734 */
Copyright 2014, Texas Instruments Incorporated