Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Joyce <matthew.joyce@embedded-brains.de>2022-02-04 13:47:18 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-13 07:55:46 +0300
commitdb2123caf8501a6d2fe0a75a4d196492b68d99c6 (patch)
treeb9ef8e83d487f6135ff77d53c20e498bd91c5af0 /newlib/libc/reent
parent81352a9df9d7c8ce9f9dc63126e4cfbd8ff4a082 (diff)
Add _REENT_SIG_FUNC(ptr)
Add a _REENT_SIG_FUNC() macro to encapsulate access to the _sig_func member of struct reent. This will help to replace the struct member with a thread-local storage object in a follow up patch.
Diffstat (limited to 'newlib/libc/reent')
-rw-r--r--newlib/libc/reent/reent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/reent/reent.c b/newlib/libc/reent/reent.c
index 2cfec5363..4e9485c7a 100644
--- a/newlib/libc/reent/reent.c
+++ b/newlib/libc/reent/reent.c
@@ -83,8 +83,8 @@ _reclaim_reent (struct _reent *ptr)
/* We should free _sig_func to avoid a memory leak, but how to
do it safely considering that a signal may be delivered immediately
after the free?
- if (ptr->_sig_func)
- _free_r (ptr, ptr->_sig_func);*/
+ if (_REENT_SIG_FUNC(ptr))
+ _free_r (ptr, _REENT_SIG_FUNC(ptr));*/
if (_REENT_CLEANUP(ptr))
{