mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 15:28:17 +08:00
Update due to CORE mutex API changes
This commit is contained in:
@@ -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
|
* embedded brains GmbH
|
||||||
* Dornierstr. 4
|
* Dornierstr. 4
|
||||||
@@ -258,7 +258,7 @@ int mtx_owned(struct mtx *m)
|
|||||||
Semaphore_Control *sema = _Semaphore_Get(m->lock_object.lo_id, &location);
|
Semaphore_Control *sema = _Semaphore_Get(m->lock_object.lo_id, &location);
|
||||||
|
|
||||||
if (location == OBJECTS_LOCAL && !_Attributes_Is_counting_semaphore(sema->attribute_set)) {
|
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();
|
_Thread_Enable_dispatch();
|
||||||
|
|
||||||
|
@@ -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
|
* embedded brains GmbH
|
||||||
* Dornierstr. 4
|
* Dornierstr. 4
|
||||||
@@ -343,7 +343,7 @@ sx_xlocked(struct sx *sx)
|
|||||||
Semaphore_Control *sema = _Semaphore_Get(sx->lock_object.lo_id, &location);
|
Semaphore_Control *sema = _Semaphore_Get(sx->lock_object.lo_id, &location);
|
||||||
|
|
||||||
if (location == OBJECTS_LOCAL && !_Attributes_Is_counting_semaphore(sema->attribute_set)) {
|
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();
|
_Thread_Enable_dispatch();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user