1 /****************************\r
2 * qmsim.h: qmss lld, hw simulator\r
3 *************************************************\r
4 * FILE: net_test.c\r
5 * \r
6 * DESCRIPTION: netapi user space transport\r
7 * library test application - simulator code for desktop testing\r
8 * \r
9 * REVISION HISTORY: rev 0.0.1 \r
10 *\r
11 * Copyright (c) Texas Instruments Incorporated 2010-2011\r
12 * \r
13 * Redistribution and use in source and binary forms, with or without \r
14 * modification, are permitted provided that the following conditions \r
15 * are met:\r
16 *\r
17 * Redistributions of source code must retain the above copyright \r
18 * notice, this list of conditions and the following disclaimer.\r
19 *\r
20 * Redistributions in binary form must reproduce the above copyright\r
21 * notice, this list of conditions and the following disclaimer in the \r
22 * documentation and/or other materials provided with the \r
23 * distribution.\r
24 *\r
25 * Neither the name of Texas Instruments Incorporated nor the names of\r
26 * its contributors may be used to endorse or promote products derived\r
27 * from this software without specific prior written permission.\r
28 *\r
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
40 *****************************/\r
41 #ifndef __QMSIM__H\r
42 #define __QMSIM__H\r
43 \r
44 \r
45 #ifndef NULL\r
46 #define NULL (void*) 0\r
47 #endif\r
48 \r
49 typedef struct Q_t\r
50 {\r
51 int size;\r
52 int head;\r
53 int tail;\r
54 int ne;\r
55 void ** q;\r
56 } Q;\r
57 \r
58 /*-----------------------*/\r
59 /*--------simulator------*/\r
60 Q * qsim_create(int nelem);\r
61 int qsim_push(Q *, void *p);\r
62 void * qsim_pop(Q * );\r
63 void qsim_close(Q * );\r
64 #endif\r