[asterisk-commits] dlee: branch dlee/taskprocessor-optimization r399620 - /team/dlee/taskprocess...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Sep 22 13:34:15 CDT 2013


Author: dlee
Date: Sun Sep 22 13:34:10 2013
New Revision: 399620

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399620
Log:
Silly warnings

Modified:
    team/dlee/taskprocessor-optimization/include/asterisk/sem.h

Modified: team/dlee/taskprocessor-optimization/include/asterisk/sem.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/taskprocessor-optimization/include/asterisk/sem.h?view=diff&rev=399620&r1=399619&r2=399620
==============================================================================
--- team/dlee/taskprocessor-optimization/include/asterisk/sem.h (original)
+++ team/dlee/taskprocessor-optimization/include/asterisk/sem.h Sun Sep 22 13:34:10 2013
@@ -37,6 +37,33 @@
 
 #define AST_SEM_VALUE_MAX SEM_VALUE_MAX
 
+/* These are thin wrappers; might as well inline them */
+
+static force_inline int ast_sem_init(struct ast_sem *sem, int pshared, unsigned int value)
+{
+	return sem_init(&sem->real_sem, pshared, value);
+}
+
+static force_inline int ast_sem_destroy(struct ast_sem *sem)
+{
+	return sem_destroy(&sem->real_sem);
+}
+
+static force_inline int ast_sem_post(struct ast_sem *sem)
+{
+	return sem_post(&sem->real_sem);
+}
+
+static force_inline int ast_sem_wait(struct ast_sem *sem)
+{
+	return sem_wait(&sem->real_sem);
+}
+
+static force_inline int ast_sem_getvalue(struct ast_sem *sem, int *sval)
+{
+	return sem_getvalue(&sem->real_sem, sval);
+}
+
 #else
 /* Unnamed semaphores don't work. Rolling our own, I guess... */
 
@@ -56,8 +83,6 @@
 };
 
 #define AST_SEM_VALUE_MAX INT_MAX
-
-#endif
 
 /*!
  * \brief Initialize a semaphore.
@@ -125,35 +150,6 @@
  */
 int ast_sem_getvalue(struct ast_sem *sem, int *sval);
 
-#ifdef HAS_WORKING_SEMAPHORE
-
-/* These are thin wrappers; might as well inline them */
-
-static force_inline int ast_sem_init(struct ast_sem *sem, int pshared, unsigned int value)
-{
-	return sem_init(&sem->real_sem, pshared, value);
-}
-
-static force_inline int ast_sem_destroy(struct ast_sem *sem)
-{
-	return sem_destroy(&sem->real_sem);
-}
-
-static force_inline int ast_sem_post(struct ast_sem *sem)
-{
-	return sem_post(&sem->real_sem);
-}
-
-static force_inline int ast_sem_wait(struct ast_sem *sem)
-{
-	return sem_wait(&sem->real_sem);
-}
-
-static force_inline int ast_sem_getvalue(struct ast_sem *sem, int *sval)
-{
-	return sem_getvalue(&sem->real_sem, sval);
-}
-
-#endif /* HAS_WORKING_SEMAPHORE */
+#endif
 
 #endif /* ASTERISK_SEMAPHORE_H */




More information about the asterisk-commits mailing list