From be43b79fcabb7551677e2d27c75e2a500e2ba622 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 22 Sep 2014 13:42:26 +0200 Subject: 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. --- freebsd/sys/sys/condvar.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'freebsd/sys/sys/condvar.h') 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 -#include -#endif -struct cv { -#ifdef __rtems__ - rtems_chain_node cv_node; - pthread_cond_t cv_id; +#include #endif /* __rtems__ */ +struct cv { const char *cv_description; #ifndef __rtems__ int cv_waiters; +#else /* __rtems__ */ + Thread_queue_Control cv_waiters; #endif /* __rtems__ */ }; -- cgit v1.2.3