2 eXosip - This is the eXtended osip library.
3 Copyright (C) 2002, 2003 Aymeric MOIZARD - jack@atosc.org
5 eXosip is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 eXosip 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
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef __OSIP_CONDV_H__
21 #define __OSIP_CONDV_H__
33 * @brief oSIP condition variables definitions
35 * Those methods are only available if the library is compile
36 * in multi threaded mode. This is the default for oSIP.
40 * @defgroup oSIP_COND oSIP condition variables definitions
50 #if defined(__PSOS__) || defined(__VXWORKS_OS__)
57 /* condv implementation */
58 #if defined(WIN32) || defined(_WIN32_WCE)
61 * @defvar struct timespec
73 * Allocate and Initialise a condition variable
75 struct osip_cond *osip_cond_init (void);
77 * Destroy a condition variable
78 * @param cond The condition variable to destroy.
80 int osip_cond_destroy (struct osip_cond *_cond);
82 * Signal the condition variable.
83 * @param cond The condition variable to signal.
85 int osip_cond_signal (struct osip_cond *cond);
88 * Wait on the condition variable.
89 * @param cond The condition variable to wait on.
90 * @param mut The external mutex
92 int osip_cond_wait (struct osip_cond *cond, struct osip_mutex *mut);
94 * Timed wait on the condition variable.
95 * @param cond The condition variable to wait on.
96 * @param mut The external mutex
97 * @param abstime time to wait until
99 int osip_cond_timedwait (struct osip_cond *cond, struct osip_mutex *mut,
100 const struct timespec *abstime);