[haiku-commits] haiku: hrev43416 - src/system/kernel

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 6 Dec 2011 01:54:22 +0100 (CET)

hrev43416 adds 1 changeset to branch 'master'
old head: 7f4de882134e07c606abc76950bea87e873e1f50
new head: da329fc01237545c8f5678497a2ffb8409dd3ba4

----------------------------------------------------------------------------

da329fc: Add missing asignment of return code in wait_for_thread_etc().
  
  While it was detected that the thread is in the destruction phase
  and that it was necessary to wait and then have a valid status code
  in the death entry, that status code wasn't actually returned. This
  lead to uninitialized values for the return code even though
  wait_for_thread[_etc]() would return B_OK.

                                            [ Michael Lotz <mmlr@xxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev43416
Commit:      da329fc01237545c8f5678497a2ffb8409dd3ba4
URL:         http://cgit.haiku-os.org/haiku/commit/?id=da329fc
Author:      Michael Lotz <mmlr@xxxxxxxx>
Date:        Tue Dec  6 00:53:27 2011 UTC

----------------------------------------------------------------------------

1 files changed, 3 insertions(+), 0 deletions(-)
src/system/kernel/thread.cpp |    3 +++

----------------------------------------------------------------------------

diff --git a/src/system/kernel/thread.cpp b/src/system/kernel/thread.cpp
index a786609..43e69d3 100644
--- a/src/system/kernel/thread.cpp
+++ b/src/system/kernel/thread.cpp
@@ -2563,6 +2563,9 @@ wait_for_thread_etc(thread_id id, uint32 flags, bigtime_t 
timeout,
                        // middle of the cleanup.
                        acquire_sem(exitSem);
                        status = B_OK;
+
+                       if (_returnCode != NULL)
+                               *_returnCode = death.status;
                }
        }
 


Other related posts:

  • » [haiku-commits] haiku: hrev43416 - src/system/kernel - mmlr