summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-12-12 01:04:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-12-12 01:04:18 +0000
commite5b78e248ee6ac4920e9f56c9cd72aecf66eef7f (patch)
tree5a90a3722801b0487b370db8e1861ab4f17b0b3b
parent2002-12-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-e5b78e248ee6ac4920e9f56c9cd72aecf66eef7f.tar.bz2
2002-12-11 Vladimir Nesic <vnesic@dkts.co.yu>
* src/cancelrun.c, src/cleanuppop.c: Get the last real node not the permanent null last node.
-rw-r--r--cpukit/posix/ChangeLog5
-rw-r--r--cpukit/posix/src/cancelrun.c3
-rw-r--r--cpukit/posix/src/cleanuppop.c3
3 files changed, 9 insertions, 2 deletions
diff --git a/cpukit/posix/ChangeLog b/cpukit/posix/ChangeLog
index fb25b26c62..b691782189 100644
--- a/cpukit/posix/ChangeLog
+++ b/cpukit/posix/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-11 Vladimir Nesic <vnesic@dkts.co.yu>
+
+ * src/cancelrun.c, src/cleanuppop.c: Get the last real node not the
+ permanent null last node.
+
2002-12-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/Makefile.am: Remove.
diff --git a/cpukit/posix/src/cancelrun.c b/cpukit/posix/src/cancelrun.c
index fb93e1958f..59138ac1b7 100644
--- a/cpukit/posix/src/cancelrun.c
+++ b/cpukit/posix/src/cancelrun.c
@@ -41,7 +41,8 @@ void _POSIX_Threads_cancel_run(
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
- handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack );
+ handler = (POSIX_Cancel_Handler_control *)
+ _Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
diff --git a/cpukit/posix/src/cleanuppop.c b/cpukit/posix/src/cleanuppop.c
index f9706bd408..f477d1f0c8 100644
--- a/cpukit/posix/src/cleanuppop.c
+++ b/cpukit/posix/src/cleanuppop.c
@@ -40,7 +40,8 @@ void pthread_cleanup_pop(
return;
_ISR_Disable( level );
- handler = (POSIX_Cancel_Handler_control *) _Chain_Tail( handler_stack );
+ handler = (POSIX_Cancel_Handler_control *)
+ _Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );