summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys/condvar.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-09-22 13:42:26 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-09-23 10:03:10 +0200
commitbe43b79fcabb7551677e2d27c75e2a500e2ba622 (patch)
treeadacb76593743ee5bf58d0ea5df2db97880b5d5a /freebsd/sys/sys/condvar.h
parentInclude missing header file (diff)
downloadrtems-libbsd-be43b79fcabb7551677e2d27c75e2a500e2ba622.tar.bz2
Replace RTEMS objects with custom implementation
Performance analysis revealed that the standard RTEMS objects are a major bottleneck. The object get mechanism and attribute checks at runtime have a significant overhead. Use a custom implementation for synchronization primitives. This drops also the size of the synchronization primitives considerably.
Diffstat (limited to 'freebsd/sys/sys/condvar.h')
-rw-r--r--freebsd/sys/sys/condvar.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/freebsd/sys/sys/condvar.h b/freebsd/sys/sys/condvar.h
index 51da8170..8b2ee4db 100644
--- a/freebsd/sys/sys/condvar.h
+++ b/freebsd/sys/sys/condvar.h
@@ -44,17 +44,14 @@ TAILQ_HEAD(cv_waitq, thread);
* optimization to avoid looking up the sleep queue if there are no waiters.
*/
#ifdef __rtems__
-#include <pthread.h>
-#include <rtems/chain.h>
-#endif
-struct cv {
-#ifdef __rtems__
- rtems_chain_node cv_node;
- pthread_cond_t cv_id;
+#include <rtems/score/threadq.h>
#endif /* __rtems__ */
+struct cv {
const char *cv_description;
#ifndef __rtems__
int cv_waiters;
+#else /* __rtems__ */
+ Thread_queue_Control cv_waiters;
#endif /* __rtems__ */
};