]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
avoid namespace collision with cepstral.
authorMichael Jerris <mike@jerris.com>
Sat, 10 Mar 2007 17:51:20 +0000 (17:51 +0000)
committerMichael Jerris <mike@jerris.com>
Sat, 10 Mar 2007 17:51:20 +0000 (17:51 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4502 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/iax/.update
libs/iax/src/iax-mutex.c
libs/iax/src/iax-mutex.h

index f0780d8073af4c23886015977b943e0dcd703797..dab57be5fd0422aabc98e7bb573c83518eadc75d 100644 (file)
@@ -1 +1 @@
-Mon Feb 19 12:03:56 EST 2007
\ No newline at end of file
+Sat Mar 10 12:59:56 EST 2007
\ No newline at end of file
index 6fd82e7d5be3b56d6eb5b3a236554aaa205ad70e..bfbb9d4d57e624a12a6cef0a44f9070bfd0facec 100644 (file)
@@ -5,15 +5,15 @@
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
  * furnished to do so.
- *\r
- * This work is provided under this license on an "as is" basis, without warranty of any kind,\r
- * either expressed or implied, including, without limitation, warranties that the covered code\r
- * is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire\r
- * risk as to the quality and performance of the covered code is with you. Should any covered\r
- * code prove defective in any respect, you (not the initial developer or any other contributor)\r
- * assume the cost of any necessary servicing, repair or correction. This disclaimer of warranty\r
- * constitutes an essential part of this license. No use of any covered code is authorized hereunder\r
- * except under this disclaimer. \r
+ *
+ * This work is provided under this license on an "as is" basis, without warranty of any kind,
+ * either expressed or implied, including, without limitation, warranties that the covered code
+ * is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire
+ * risk as to the quality and performance of the covered code is with you. Should any covered
+ * code prove defective in any respect, you (not the initial developer or any other contributor)
+ * assume the cost of any necessary servicing, repair or correction. This disclaimer of warranty
+ * constitutes an essential part of this license. No use of any covered code is authorized hereunder
+ * except under this disclaimer. 
  *
  */
 
@@ -38,68 +38,68 @@ struct mutex {
 #endif
 
 
-mutex_status_t mutex_create(mutex_t **mutex)\r
-{\r
-       mutex_t *check = NULL;\r
-\r
-       check = (mutex_t *)malloc(sizeof(**mutex));\r
-       if (!check)\r
-               return MUTEX_FAILURE;\r
-#ifdef WIN32\r
-       InitializeCriticalSection(&check->mutex);\r
-#else\r
-       if (pthread_mutex_init(&check->mutex, NULL))\r
-               return MUTEX_FAILURE;\r
-\r
-#endif\r
-\r
-       *mutex = check;\r
-\r
-       return MUTEX_SUCCESS;\r
-}\r
-\r
-mutex_status_t mutex_destroy(mutex_t *mutex)\r
-{\r
-#ifdef WIN32\r
-       DeleteCriticalSection(&mutex->mutex);\r
-#else\r
-       if (pthread_mutex_destroy(&mutex->mutex))\r
-               return MUTEX_FAILURE;\r
-#endif\r
-       free(mutex);\r
-       return MUTEX_SUCCESS;\r
-}\r
-\r
-mutex_status_t mutex_lock(mutex_t *mutex)\r
-{\r
-#ifdef WIN32\r
-       EnterCriticalSection(&mutex->mutex);\r
-#else\r
-       if (pthread_mutex_lock(&mutex->mutex))\r
-               return MUTEX_FAILURE;\r
-#endif\r
-       return MUTEX_SUCCESS;\r
-}\r
-\r
-mutex_status_t mutex_trylock(mutex_t *mutex)\r
-{\r
-#ifdef WIN32\r
-       if (!TryEnterCriticalSection(&mutex->mutex))\r
-               return MUTEX_FAILURE;\r
-#else\r
-       if (pthread_mutex_trylock(&mutex->mutex))\r
-               return MUTEX_FAILURE;\r
-#endif\r
-       return MUTEX_SUCCESS;\r
-}\r
-\r
-mutex_status_t mutex_unlock(mutex_t *mutex)\r
-{\r
-#ifdef WIN32\r
-       LeaveCriticalSection(&mutex->mutex);\r
-#else\r
-       if (pthread_mutex_unlock(&mutex->mutex))\r
-               return MUTEX_FAILURE;\r
-#endif\r
-       return MUTEX_SUCCESS;\r
-}\r
+mutex_status_t iax_mutex_create(mutex_t **mutex)
+{
+       mutex_t *check = NULL;
+
+       check = (mutex_t *)malloc(sizeof(**mutex));
+       if (!check)
+               return MUTEX_FAILURE;
+#ifdef WIN32
+       InitializeCriticalSection(&check->mutex);
+#else
+       if (pthread_mutex_init(&check->mutex, NULL))
+               return MUTEX_FAILURE;
+
+#endif
+
+       *mutex = check;
+
+       return MUTEX_SUCCESS;
+}
+
+mutex_status_t iax_mutex_destroy(mutex_t *mutex)
+{
+#ifdef WIN32
+       DeleteCriticalSection(&mutex->mutex);
+#else
+       if (pthread_mutex_destroy(&mutex->mutex))
+               return MUTEX_FAILURE;
+#endif
+       free(mutex);
+       return MUTEX_SUCCESS;
+}
+
+mutex_status_t iax_mutex_lock(mutex_t *mutex)
+{
+#ifdef WIN32
+       EnterCriticalSection(&mutex->mutex);
+#else
+       if (pthread_mutex_lock(&mutex->mutex))
+               return MUTEX_FAILURE;
+#endif
+       return MUTEX_SUCCESS;
+}
+
+mutex_status_t iax_mutex_trylock(mutex_t *mutex)
+{
+#ifdef WIN32
+       if (!TryEnterCriticalSection(&mutex->mutex))
+               return MUTEX_FAILURE;
+#else
+       if (pthread_mutex_trylock(&mutex->mutex))
+               return MUTEX_FAILURE;
+#endif
+       return MUTEX_SUCCESS;
+}
+
+mutex_status_t iax_mutex_unlock(mutex_t *mutex)
+{
+#ifdef WIN32
+       LeaveCriticalSection(&mutex->mutex);
+#else
+       if (pthread_mutex_unlock(&mutex->mutex))
+               return MUTEX_FAILURE;
+#endif
+       return MUTEX_SUCCESS;
+}
index 1c0f407b8e4db846733fcf2065470bcfbf552983..3d8a5a2d7453fb9855bcfc914aa7b06cabc0aaa9 100644 (file)
@@ -5,33 +5,33 @@
  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  * copies of the Software, and permit persons to whom the Software is
  * furnished to do so.
- *\r
- * This work is provided under this license on an "as is" basis, without warranty of any kind,\r
- * either expressed or implied, including, without limitation, warranties that the covered code\r
- * is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire\r
- * risk as to the quality and performance of the covered code is with you. Should any covered\r
- * code prove defective in any respect, you (not the initial developer or any other contributor)\r
- * assume the cost of any necessary servicing, repair or correction. This disclaimer of warranty\r
- * constitutes an essential part of this license. No use of any covered code is authorized hereunder\r
- * except under this disclaimer. \r
+ *
+ * This work is provided under this license on an "as is" basis, without warranty of any kind,
+ * either expressed or implied, including, without limitation, warranties that the covered code
+ * is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire
+ * risk as to the quality and performance of the covered code is with you. Should any covered
+ * code prove defective in any respect, you (not the initial developer or any other contributor)
+ * assume the cost of any necessary servicing, repair or correction. This disclaimer of warranty
+ * constitutes an essential part of this license. No use of any covered code is authorized hereunder
+ * except under this disclaimer. 
  *
  */
-\r
-\r
-#ifndef _SIMPLE_ABSTRACT_MUTEX_H\r
-#define _SIMPLE_ABSTRACT_MUTEX_H\r
-\r
-typedef struct mutex mutex_t;\r
-\r
-typedef enum mutex_status {\r
-       MUTEX_SUCCESS,\r
-       MUTEX_FAILURE\r
-} mutex_status_t;\r
-\r
-mutex_status_t mutex_create(mutex_t **mutex);\r
-mutex_status_t mutex_destroy(mutex_t *mutex);\r
-mutex_status_t mutex_lock(mutex_t *mutex);\r
-mutex_status_t mutex_trylock(mutex_t *mutex);\r
-mutex_status_t mutex_unlock(mutex_t *mutex);\r
-\r
-#endif\r
+
+
+#ifndef _SIMPLE_ABSTRACT_MUTEX_H
+#define _SIMPLE_ABSTRACT_MUTEX_H
+
+typedef struct mutex mutex_t;
+
+typedef enum mutex_status {
+       MUTEX_SUCCESS,
+       MUTEX_FAILURE
+} mutex_status_t;
+
+mutex_status_t iax_mutex_create(mutex_t **mutex);
+mutex_status_t iax_mutex_destroy(mutex_t *mutex);
+mutex_status_t iax_mutex_lock(mutex_t *mutex);
+mutex_status_t iax_mutex_trylock(mutex_t *mutex);
+mutex_status_t iax_mutex_unlock(mutex_t *mutex);
+
+#endif