From b7ca25162ae9584229c20d68a745dcaeda48a78a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 30 Jul 2015 02:53:04 -0500 Subject: [PATCH] Fix typo in Sorry, there was a typo in which leads to memory corruption since not enough space is reserved for the lock object. newlib/ChangeLog 2015-07-30 Sebastian Huber * libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use proper type. --- newlib/ChangeLog | 5 +++++ newlib/libc/sys/rtems/include/sys/lock.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 528da824b..6d84d7104 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2015-07-30 Sebastian Huber + + * libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use + proper type. + 2015-07-30 Wilco Dijkstra * libc/machine/aarch64/memset.S (memset): Rewrite. diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h index 49d8f8d6d..d2a7fb1aa 100644 --- a/newlib/libc/sys/rtems/include/sys/lock.h +++ b/newlib/libc/sys/rtems/include/sys/lock.h @@ -216,7 +216,7 @@ typedef struct _Mutex_recursive_Control _LOCK_RECURSIVE_T; _qualifier _LOCK_T _designator = _MUTEX_INITIALIZER #define __LOCK_INIT_RECURSIVE(_qualifier, _designator) \ - _qualifier _LOCK_T _designator = _MUTEX_RECURSIVE_INITIALIZER + _qualifier _LOCK_RECURSIVE_T _designator = _MUTEX_RECURSIVE_INITIALIZER #define __lock_init(_lock) _Mutex_Initialize(&_lock) #define __lock_acquire(_lock) _Mutex_Acquire(&_lock)