[haiku-commits] haiku: hrev50954 - src/system/libroot/posix/pthread

  • From: jerome.duval@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 14 Feb 2017 20:51:15 +0100 (CET)

hrev50954 adds 1 changeset to branch 'master'
old head: ab4bd5d3ce2cf1409106726a201eef1d9e49219d
new head: 90acbbfecb026d8a4b83b0b0c26c778fd41c4042
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=90acbbfecb02+%5Eab4bd5d3ce2c

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

90acbbfecb02: pthread: have pthread_setschedparam return 0 on success.
  
  * fixes #13299.

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

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

Revision:    hrev50954
Commit:      90acbbfecb026d8a4b83b0b0c26c778fd41c4042
URL:         http://cgit.haiku-os.org/haiku/commit/?id=90acbbfecb02
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Tue Feb 14 19:48:43 2017 UTC

Ticket:      https://dev.haiku-os.org/ticket/13299

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

1 file changed, 3 insertions(+), 1 deletion(-)
src/system/libroot/posix/pthread/pthread.cpp | 4 +++-

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

diff --git a/src/system/libroot/posix/pthread/pthread.cpp 
b/src/system/libroot/posix/pthread/pthread.cpp
index ef708b9..cb7b5f2 100644
--- a/src/system/libroot/posix/pthread/pthread.cpp
+++ b/src/system/libroot/posix/pthread/pthread.cpp
@@ -291,7 +291,9 @@ pthread_setschedparam(pthread_t thread, int policy,
        status = _kern_set_thread_priority(thread->id, param->sched_priority);
        if (status == B_BAD_THREAD_ID)
                return ESRCH;
-       return status;
+       if (status < B_OK)
+               return status;
+       return 0;
 }
 
 


Other related posts: