[rtems-libbsd commit] Update due to CORE mutex API changes

Sebastian Huber sebh at rtems.org
Thu Apr 17 09:20:33 UTC 2014


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Apr 17 09:44:39 2014 +0200

Update due to CORE mutex API changes

---

 rtemsbsd/rtems/rtems-bsd-mutex.c |    4 ++--
 rtemsbsd/rtems/rtems-bsd-sx.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rtemsbsd/rtems/rtems-bsd-mutex.c b/rtemsbsd/rtems/rtems-bsd-mutex.c
index 0a3c7fb..c6daab0 100644
--- a/rtemsbsd/rtems/rtems-bsd-mutex.c
+++ b/rtemsbsd/rtems/rtems-bsd-mutex.c
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (c) 2009-2013 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2009-2014 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Dornierstr. 4
@@ -258,7 +258,7 @@ int mtx_owned(struct mtx *m)
 	Semaphore_Control *sema = _Semaphore_Get(m->lock_object.lo_id, &location);
 
 	if (location == OBJECTS_LOCAL && !_Attributes_Is_counting_semaphore(sema->attribute_set)) {
-		int owned = sema->Core_control.mutex.holder_id == rtems_task_self();
+		int owned = sema->Core_control.mutex.holder == _Thread_Executing;
 
 		_Thread_Enable_dispatch();
 
diff --git a/rtemsbsd/rtems/rtems-bsd-sx.c b/rtemsbsd/rtems/rtems-bsd-sx.c
index 948297f..b8bc336 100644
--- a/rtemsbsd/rtems/rtems-bsd-sx.c
+++ b/rtemsbsd/rtems/rtems-bsd-sx.c
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (c) 2009-2013 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2009-2014 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Dornierstr. 4
@@ -343,7 +343,7 @@ sx_xlocked(struct sx *sx)
 	Semaphore_Control *sema = _Semaphore_Get(sx->lock_object.lo_id, &location);
 
 	if (location == OBJECTS_LOCAL && !_Attributes_Is_counting_semaphore(sema->attribute_set)) {
-		int xlocked = sema->Core_control.mutex.holder_id == rtems_task_self();
+		int xlocked = sema->Core_control.mutex.holder == _Thread_Executing;
 
 		_Thread_Enable_dispatch();
 




More information about the vc mailing list