[RTEMS Project] #3145: pthread_getattr_np does not work

RTEMS trac trac at rtems.org
Wed Sep 20 08:11:31 UTC 2017

#3145: pthread_getattr_np does not work
 Reporter:  ye0me0ge0tt  |      Owner:  joel.sherrill@…
     Type:  defect       |     Status:  new
 Priority:  highest      |  Milestone:
Component:  cpukit       |    Version:  4.11
 Severity:  normal       |   Keywords:
 I can not get attributes of thread via this function.

 The code shows below (sorry that I can not attack a file behind this)
 #define __GNU_VISIBLE
 #include <pthread.h>

 void test_thread (guint8 **staddr, size_t *stsize)
     pthread_attr_t attr;
     uint8_t **staddr = NULL;
     size_t *stsize = 0;
     int res = 0;

     res = pthread_getattr_np (pthread_self(), &attr);
     pthread_attr_getstack (&attr, (void**)staddr, stsize);
     pthread_attr_destroy (&attr);

 The return value of pthread_getattr_np is 0 which means that this function
 runs well, but the elements of attr structure are either 0(like stackaddr
 and stacksize) or 1(like is_initialized).

Ticket URL: <http://devel.rtems.org/ticket/3145>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list