[rtems-libbsd commit] Update due to header file changes

Sebastian Huber sebh at rtems.org
Fri Sep 20 14:16:45 UTC 2013


Module:    rtems-libbsd
Branch:    master
Commit:    473437ccd716864711b900c36f46fcb4b26a605e
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=473437ccd716864711b900c36f46fcb4b26a605e

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Sep 20 15:01:27 2013 +0200

Update due to header file changes

---

 rtemsbsd/src/rtems-bsd-condvar.c |   15 +++++++--------
 rtemsbsd/src/rtems-bsd-mutex.c   |   11 ++++++-----
 rtemsbsd/src/rtems-bsd-rwlock.c  |    6 +++---
 rtemsbsd/src/rtems-bsd-support.c |   10 ++++------
 rtemsbsd/src/rtems-bsd-sx.c      |   11 ++++++-----
 rtemsbsd/src/rtems-bsd-synch.c   |   13 ++++++-------
 6 files changed, 32 insertions(+), 34 deletions(-)

diff --git a/rtemsbsd/src/rtems-bsd-condvar.c b/rtemsbsd/src/rtems-bsd-condvar.c
index 63f3000..cb97174 100644
--- a/rtemsbsd/src/rtems-bsd-condvar.c
+++ b/rtemsbsd/src/rtems-bsd-condvar.c
@@ -7,10 +7,9 @@
  */
 
 /*
- * Copyright (c) 2009, 2010 embedded brains GmbH.  
- * All rights reserved.
+ * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.
  *
- *  embedded brains GmbH
+ *  Dornierstr. 4
  *  Obere Lagerstr. 30
  *  82178 Puchheim
  *  Germany
@@ -38,12 +37,12 @@
  * SUCH DAMAGE.
  */
 
-/* Necessary to obtain some internal functions */
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-
 #include <freebsd/machine/rtems-bsd-config.h>
 
-#include <rtems/posix/cond.h>
+#include <rtems/score/objectimpl.h>
+#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadqimpl.h>
+#include <rtems/posix/condimpl.h>
 
 #include <freebsd/sys/param.h>
 #include <freebsd/sys/types.h>
@@ -109,7 +108,7 @@ static int _cv_wait_support(struct cv *cv, struct lock_object *lock, int timo, b
 		_Thread_Executing->Wait.id = cv->cv_id;
 
 		/* FIXME: Integer conversion */
-		_Thread_queue_Enqueue(&pcv->Wait_queue, (Watchdog_Interval) timo);
+		_Thread_queue_Enqueue(&pcv->Wait_queue, _Thread_Executing, (Watchdog_Interval) timo);
 
 		DROP_GIANT();
 
diff --git a/rtemsbsd/src/rtems-bsd-mutex.c b/rtemsbsd/src/rtems-bsd-mutex.c
index 0468c13..2324914 100644
--- a/rtemsbsd/src/rtems-bsd-mutex.c
+++ b/rtemsbsd/src/rtems-bsd-mutex.c
@@ -7,10 +7,10 @@
  */
 
 /*
- * Copyright (c) 2009, 2010 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2009-2013 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
- *  Obere Lagerstr. 30
+ *  Dornierstr. 4
  *  82178 Puchheim
  *  Germany
  *  <rtems at embedded-brains.de>
@@ -37,11 +37,12 @@
  * SUCH DAMAGE.
  */
 
-/* Necessary to obtain some internal functions */
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-
 #include <freebsd/machine/rtems-bsd-config.h>
 
+#include <rtems/score/objectimpl.h>
+#include <rtems/rtems/attrimpl.h>
+#include <rtems/rtems/semimpl.h>
+
 #include <freebsd/sys/param.h>
 #include <freebsd/sys/types.h>
 #include <freebsd/sys/systm.h>
diff --git a/rtemsbsd/src/rtems-bsd-rwlock.c b/rtemsbsd/src/rtems-bsd-rwlock.c
index 21c61da..a38a9a1 100644
--- a/rtemsbsd/src/rtems-bsd-rwlock.c
+++ b/rtemsbsd/src/rtems-bsd-rwlock.c
@@ -37,13 +37,13 @@
  * SUCH DAMAGE.
  */
 
-/* Necessary to obtain some internal functions */
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
 #include <pthread.h>
-#include <rtems/posix/rwlock.h>
 
 #include <freebsd/machine/rtems-bsd-config.h>
 
+#include <rtems/score/objectimpl.h>
+#include <rtems/posix/rwlockimpl.h>
+
 #include <sys/types.h>
 #include <freebsd/sys/param.h>
 #include <freebsd/sys/types.h>
diff --git a/rtemsbsd/src/rtems-bsd-support.c b/rtemsbsd/src/rtems-bsd-support.c
index 4a61b17..8c0ccac 100644
--- a/rtemsbsd/src/rtems-bsd-support.c
+++ b/rtemsbsd/src/rtems-bsd-support.c
@@ -37,14 +37,12 @@
  * SUCH DAMAGE.
  */
 
-/*
- * This violation is specifically for _Thread_Disable_dispatch
- * and _Thread_Enable_dispatch. Use of the critical_enter()
- * and critical_exit() routines should be reviewed.
- */
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 
+/* FIXME: This file needs careful review. */
+
 #include <freebsd/machine/rtems-bsd-config.h>
 
+#include <rtems/score/threaddispatch.h>
+
 #include <freebsd/sys/types.h>
 #include <freebsd/sys/systm.h>
 #include <freebsd/sys/malloc.h>
diff --git a/rtemsbsd/src/rtems-bsd-sx.c b/rtemsbsd/src/rtems-bsd-sx.c
index 3634d85..73df4f6 100644
--- a/rtemsbsd/src/rtems-bsd-sx.c
+++ b/rtemsbsd/src/rtems-bsd-sx.c
@@ -7,10 +7,10 @@
  */
 
 /*
- * Copyright (c) 2009, 2010 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2009-2013 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
- *  Obere Lagerstr. 30
+ *  Dornierstr. 4
  *  82178 Puchheim
  *  Germany
  *  <rtems at embedded-brains.de>
@@ -37,11 +37,12 @@
  * SUCH DAMAGE.
  */
 
-/* Necessary to obtain some internal functions */
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-
 #include <freebsd/machine/rtems-bsd-config.h>
 
+#include <rtems/score/objectimpl.h>
+#include <rtems/rtems/attrimpl.h>
+#include <rtems/rtems/semimpl.h>
+
 #include <freebsd/sys/param.h>
 #include <freebsd/sys/types.h>
 #include <freebsd/sys/systm.h>
diff --git a/rtemsbsd/src/rtems-bsd-synch.c b/rtemsbsd/src/rtems-bsd-synch.c
index 110fe66..40e08e1 100644
--- a/rtemsbsd/src/rtems-bsd-synch.c
+++ b/rtemsbsd/src/rtems-bsd-synch.c
@@ -38,16 +38,15 @@
  */
 
 /*
- * This violation is specifically for _Thread_Disable_dispatch
- * and _Thread_Enable_dispatch. Use of the critical_enter()
- * and critical_exit() routines should be reviewed.
+ * FIXME: This seems to be a completely broken implementation.
  */
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 
 
 #include <freebsd/machine/rtems-bsd-config.h>
-#include <rtems/score/states.h>
+
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threaddispatch.h>
 #include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
+#include <rtems/score/threadqimpl.h>
 
 #include <freebsd/sys/param.h>
 #include <freebsd/sys/types.h>
@@ -169,7 +168,7 @@ sleep_queue_timedwait(void *wchan, int pri, int timeout, int catch)
   executing->Wait.queue = &sq->queue;
   _ISR_Enable( level );
 
-  _Thread_queue_Enqueue( &sq->queue, timeout );
+  _Thread_queue_Enqueue( &sq->queue, executing, timeout );
   _Thread_Enable_dispatch();
   return _Thread_Executing->Wait.return_code;
 }




More information about the vc mailing list