[rtems commit] posix: Set pthread attribute values in detach and setschedparm methods.

Joel Sherrill joel.sherrill at OARcorp.com
Wed Feb 19 21:19:06 UTC 2014


I am OK with this. These just ensure the attributes structure is
up to date so the new pthread_get_attributes_np() works.

Check the copyright dates on the files.

On 2/19/2014 10:33 AM, Jennifer Averett wrote:
> Module:    rtems
> Branch:    master
> Commit:    52eecbaa089523a4afaef1024225c7bf5181495e
> Changeset: http://git.rtems.org/rtems/commit/?id=52eecbaa089523a4afaef1024225c7bf5181495e
>
> Author:    Jennifer Averett <jennifer.averett at oarcorp.com>
> Date:      Wed Feb 19 10:36:01 2014 -0600
>
> posix: Set pthread attribute values in detach and setschedparm methods.
>
> ---
>
>  cpukit/posix/src/pthreaddetach.c        |    1 +
>  cpukit/posix/src/pthreadsetschedparam.c |    3 +++
>  2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
> index 1087a2c..88fd0e0 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 2759609..da948ef 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;
>  
>
> _______________________________________________
> rtems-vc mailing list
> rtems-vc at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-vc

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list