1 /*
2 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3 Copyright (C) 2001-2012 Aymeric MOIZARD amoizard@antisip.com
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 #ifndef _FIFO_H_
21 #define _FIFO_H_
22
23 #ifndef OSIP_MONOTHREAD
25 #endif
27
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46
47 #ifndef DOXYGEN
48
50
51 #endif
52
58
64 #ifndef OSIP_MONOTHREAD
67 #endif
71 };
72
105 #ifndef OSIP_MONOTHREAD
106
111 #endif
112
117
118
122 #ifdef __cplusplus
123 }
124 #endif
125 #endif
Structure for referencing a list of elements.
struct osip_sem * qisempty
semaphore for fifo
Structure for referencing a fifo.
int osip_fifo_size(osip_fifo_t *ff)
Get the number of element in a fifo.
void * osip_fifo_tryget(osip_fifo_t *ff)
Try to get an element from a fifo, but do not block if there is no element.
void osip_fifo_free(osip_fifo_t *ff)
Free a fifo element.
oSIP Thread, Mutex and Semaphore definitions
int osip_fifo_insert(osip_fifo_t *ff, void *element)
Insert an element in a fifo (at the beginning).
void * osip_fifo_get(osip_fifo_t *ff)
Get an element from a fifo or block until one is added.
osip_list_t queue
list of nodes containing elements
struct osip_mutex * qislocked
mutex for fifo
int osip_fifo_add(osip_fifo_t *ff, void *element)
Add an element in a fifo.
osip_fifo_state state
state of the fifo
Structure for referencing a semaphore element.
Structure for referencing a mutex element.
void osip_fifo_init(osip_fifo_t *ff)
Initialise a osip_fifo_t element.