pthread_getattr_np does not work

Joel Sherrill joel at rtems.org
Fri Sep 22 14:15:56 UTC 2017


The test does verify the values. I don't see a specific case of creating a
thread
with a non-standard stack value and verifying that value in the task but the
test creates a thread which retrieves its values and verifies many (most,
all?)
of them:

(gdb)
Thread - pthread_getattr_np - Verify value
46        sc = pthread_getattr_np( Thread_id, &attr );
(gdb)
47        rtems_test_assert( sc == 0 );
(gdb)
52        puts( "Thread - pthread_setschedparam: Setting highest priority
SCHED_FIFO" );
(gdb) p attr
$1 = {is_initialized = 1, stackaddr = 0x0, stacksize = 8192,
  contentionscope = 0, inheritsched = 2, schedpolicy = 2, schedparam = {
    sched_priority = 3, sched_ss_low_priority = 285216961,
    sched_ss_repl_period = {tv_sec = 0, tv_nsec = 16},
    sched_ss_init_budget = {tv_sec = 0, tv_nsec = 1}, sched_ss_max_repl =
0},
  guardsize = 0, cputime_clock_allowed = 1, detachstate = 1,
  affinitysetsize = 0, affinityset = 0x0, affinitysetpreallocated = {
    __bits = {0}}}

Clearly the attribute structure returned is not all zero.

I am not sure what you are seeing but it doesn't match what I see in
this test on the erc32.

--joel

On Fri, Sep 22, 2017 at 4:04 AM, xuelin.tian at qkmtech.com <
xuelin.tian at qkmtech.com> wrote:

> OK, no problem, thanks anyway.
>
> ------------------------------
> Best wishes,
> xuelin.tian at qkmtech.com
>
>
> *From:* Sebastian Huber <sebastian.huber at embedded-brains.de>
> *Date:* 2017-09-22 16:58
> *To:* xuelin.tian at qkmtech.com; users at rtems.org
> *Subject:* Re: pthread_getattr_np does not work
> On 22/09/17 10:55, xuelin.tian at qkmtech.com wrote:
>
> > OK, I will try to do some fix on this function. And if Sherrill and
> > you have time, please take some time on this. Thanks a lot.
>
> No, sorry. I have no time to fix this.
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20170922/6029b418/attachment.html>


More information about the users mailing list