osip_mt.h

Go to the documentation of this file.
00001 /*
00002   The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
00003   Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Aymeric MOIZARD jack@atosc.org
00004   
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Lesser General Public
00007   License as published by the Free Software Foundation; either
00008   version 2.1 of the License, or (at your option) any later version.
00009   
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Lesser General Public License for more details.
00014   
00015   You should have received a copy of the GNU Lesser General Public
00016   License along with this library; if not, write to the Free Software
00017   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00020 #ifndef _OSIP_MT_H_
00021 #define _OSIP_MT_H_
00022 
00023 #ifdef OSIP_MT
00024 
00025 #ifdef ENABLE_MPATROL
00026 #include <mpatrol.h>
00027 #endif
00028 
00029 #include <stdio.h>
00030 #ifndef _WIN32_WCE
00031 #include <errno.h>
00032 #endif
00033 
00048 #ifdef __cplusplus
00049 extern "C"
00050 {
00051 #endif
00052 
00057   struct osip_thread;
00058 
00065   struct osip_thread *osip_thread_create (int stacksize,
00066                                           void *(*func) (void *), void *arg);
00067 
00072   int osip_thread_join (struct osip_thread *thread);
00073 
00079   int osip_thread_set_priority (struct osip_thread *thread, int priority);
00083   void osip_thread_exit (void);
00084 
00085 #ifdef __cplusplus
00086 }
00087 #endif
00088 
00097 #ifdef __cplusplus
00098 extern "C"
00099 {
00100 #endif
00101 
00106   struct osip_sem;
00107 
00112   struct osip_sem *osip_sem_init (unsigned int value);
00117   int osip_sem_destroy (struct osip_sem *sem);
00122   int osip_sem_post (struct osip_sem *sem);
00128   int osip_sem_wait (struct osip_sem *sem);
00134   int osip_sem_trywait (struct osip_sem *sem);
00135 
00136 
00137 #ifdef __cplusplus
00138 }
00139 #endif
00140 
00149 #ifdef __cplusplus
00150 extern "C"
00151 {
00152 #endif
00153 
00158   struct osip_mutex;
00159 
00163   struct osip_mutex *osip_mutex_init (void);
00168   void osip_mutex_destroy (struct osip_mutex *mut);
00173   int osip_mutex_lock (struct osip_mutex *mut);
00178   int osip_mutex_unlock (struct osip_mutex *mut);
00179 
00180 #ifdef __cplusplus
00181 }
00182 #endif
00183 
00186 #endif                          /* OSIP_MT */
00187 
00188 #endif                          /* end of _THREAD_H_ */

Generated on Wed Feb 13 01:03:29 2008 for libosip by  doxygen 1.5.4