The attached patch adds setting posix attribute values to
pthread_detach() and pthread_setschedparam(). This is
is needed for method pthread_getattr_np to work correctly.
Jennifer Averett
On-Line Applications Research
From c24fb88c4d6ddb41ee2e6c347c6d09c550c12e92 Mon Sep 17 00:00:00 2001
From: Jennifer Averett <jennifer.aver...@oarcorp.com>
Date: Tue, 14 Jan 2014 09:12:33 -0600
Subject: [PATCH 93/95] posix: Modified pthread attributes to match actual
values.
---
cpukit/posix/src/pthreaddetach.c | 1 +
cpukit/posix/src/pthreadsetschedparam.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
index 74df253..bb23d75 100644
--- a/cpukit/posix/src/pthreaddetach.c
+++ b/cpukit/posix/src/pthreaddetach.c
@@ -42,6 +42,7 @@ int pthread_detach(
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->detachstate = PTHREAD_CREATE_DETACHED;
+ api->Attributes.detachstate = PTHREAD_CREATE_DETACHED;
_Objects_Put( &the_thread->Object );
return 0;
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index a54a689..ba21230 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -73,6 +73,9 @@ int pthread_setschedparam(
api->schedpolicy = policy;
api->schedparam = *param;
+ api->Attributes.schedpolicy = policy;
+ api->Attributes.schedparam = *param;
+
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
--
1.8.1.4
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel