Re: Re: pthread_getattr_np does not work

2017-09-22 Thread xuelin.tian
Thanks so much for your test. The parts of this structure I care about most are the stackaddr and stacksize (and guardsize maybe), where stackaddr always returns 0. The value of stacksize is either 8192 or 0, based on the fact that this attribute structure is retrieved from POSIX_Init or other

RTEMS and Google Code-In

2017-09-22 Thread Joel Sherrill
Hi Google Code-In is a program sponsored by the Google Open Source Program Office like Google Summer of Code but targeted to high school students. The projects are small taking no more than a few days. In order to be available to as many students as possible, many are non-coding. Open source orga

Re: Re: pthread_getattr_np does not work

2017-09-22 Thread Joel Sherrill
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 4

Re: Re: pthread_getattr_np does not work

2017-09-22 Thread xuelin.t...@qkmtech.com
OK, no problem, thanks anyway. Best wishes, xuelin.t...@qkmtech.com From: Sebastian Huber Date: 2017-09-22 16:58 To: xuelin.t...@qkmtech.com; users@rtems.org Subject: Re: pthread_getattr_np does not work On 22/09/17 10:55, xuelin.t...@qkmtech.com wrote: > OK, I will try to do some fix on thi

Re: pthread_getattr_np does not work

2017-09-22 Thread Sebastian Huber
On 22/09/17 10:55, xuelin.t...@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 P

Re: Re: pthread_getattr_np does not work

2017-09-22 Thread xuelin.t...@qkmtech.com
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. Best wishes, xuelin.t...@qkmtech.com From: Sebastian Huber Date: 2017-09-22 16:48 To: xuelin.t...@qkmtech.com; users@rtems.org Subject: Re: pthread_getattr_np does n

Re: pthread_getattr_np does not work

2017-09-22 Thread Sebastian Huber
On 22/09/17 10:43, xuelin.t...@qkmtech.com wrote: >> >> So, how can I modify the source code in rtems to let this function >> work? Thanks a lot. > You have to edit: > cpukit/posix/src/pthreadgetattrnp.c Yes, I know this. I just do not know how to do this. The implementation of pthread_getattr

Re: Re: pthread_getattr_np does not work

2017-09-22 Thread xuelin.t...@qkmtech.com
>> But, this test just checks the return value, not the value of elements >> in pthread_attr_t structure. When I tried to print out these values, >> the same result as before appeared, all 0... > It would be good to check the expected values with test assertions. The return value of pthread_geta

Re: pthread_getattr_np does not work

2017-09-22 Thread Sebastian Huber
On 22/09/17 10:24, xuelin.t...@qkmtech.com wrote: I found out that there is a test in 4.12-master about pthread_getattr_np, so I compiled that one and ran it. The result shows that this function works well, like this * ***

Re: Re: pthread_getattr_np does not work

2017-09-22 Thread xuelin.t...@qkmtech.com
I found out that there is a test in 4.12-master about pthread_getattr_np, so I compiled that one and ran it. The result shows that this function works well, like this * *** BEGIN OF TEST PSXGETATTRNP 1 *** Init - pthread_geta