This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [RTEMS] Typo in <sys/lock.h>


Committed.

On 7/30/2015 2:53 AM, Sebastian Huber wrote:
Sorry, there was a typo in <sys/lock.h> which leads to memory corruption
since not enough space is reserved for the lock object.

newlib/ChangeLog
2015-07-30  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use
	proper type.
---
  newlib/libc/sys/rtems/include/sys/lock.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h
index 49d8f8d..d2a7fb1 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)


--
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]