[rtems commit] posix: Remove superfluous thread dispatch disable

Sebastian Huber sebh at rtems.org
Mon May 2 10:09:05 UTC 2016


Module:    rtems
Branch:    master
Commit:    259d885168b548b5ebea5067f112a0d8b94d167f
Changeset: http://git.rtems.org/rtems/commit/?id=259d885168b548b5ebea5067f112a0d8b94d167f

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Apr 28 06:55:16 2016 +0200

posix: Remove superfluous thread dispatch disable

The _Thread_queue_Enqueue_critical() already deals with thread
dispatching.

Update #2555.

---

 cpukit/posix/src/sigtimedwait.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index 8f5693b..77dbe53 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -150,20 +150,18 @@ int sigtimedwait(
 
   the_info->si_signo = -1;
 
-  _Thread_Disable_dispatch();
-    executing->Wait.return_code     = EINTR;
-    executing->Wait.option          = *set;
-    executing->Wait.return_argument = the_info;
-    _Thread_queue_Enqueue_critical(
-      &_POSIX_signals_Wait_queue.Queue,
-      POSIX_SIGNALS_TQ_OPERATIONS,
-      executing,
-      STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
-      interval,
-      EAGAIN,
-      &lock_context
-    );
-  _Thread_Enable_dispatch();
+  executing->Wait.return_code     = EINTR;
+  executing->Wait.option          = *set;
+  executing->Wait.return_argument = the_info;
+  _Thread_queue_Enqueue_critical(
+    &_POSIX_signals_Wait_queue.Queue,
+    POSIX_SIGNALS_TQ_OPERATIONS,
+    executing,
+    STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
+    interval,
+    EAGAIN,
+    &lock_context
+  );
 
   /*
    * When the thread is set free by a signal, it is need to eliminate




More information about the vc mailing list