[asterisk-commits] dlee: branch dlee/stasis-forward-optimization r399621 - in /team/dlee/stasis-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Sep 22 16:48:34 CDT 2013
Author: dlee
Date: Sun Sep 22 16:48:31 2013
New Revision: 399621
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399621
Log:
Silly warnings
........
Merged revisions 399620 from http://svn.asterisk.org/svn/asterisk/team/dlee/taskprocessor-optimization
Modified:
team/dlee/stasis-forward-optimization/ (props changed)
team/dlee/stasis-forward-optimization/include/asterisk/sem.h
Propchange: team/dlee/stasis-forward-optimization/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Sep 22 16:48:31 2013
@@ -1,1 +1,1 @@
-/team/dlee/taskprocessor-optimization:1-399551
+/team/dlee/taskprocessor-optimization:1-399620
Modified: team/dlee/stasis-forward-optimization/include/asterisk/sem.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-forward-optimization/include/asterisk/sem.h?view=diff&rev=399621&r1=399620&r2=399621
==============================================================================
--- team/dlee/stasis-forward-optimization/include/asterisk/sem.h (original)
+++ team/dlee/stasis-forward-optimization/include/asterisk/sem.h Sun Sep 22 16:48:31 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