Hello Sharyathi,

Sharyathi Nagesh wrote:
> Helge
>     Please see the response below
>>
>> Yes, your original code checked for the glibc version for x86_64 only.
>> I intentionally removed the x86_64 dependency, since my patch is about 
>> to make it possible to run this specific testcase on other 
>> architectures as well (in my case for HPPA).
>> So, either we could do as you say:
>>
>> #elif defined(__x86_64__)
>> # if __GLIBC_PREREQ(2,6)
>>         return *cpu_id = sched_getcpu();
>> # endif
>> #elif defined(__hppa__)
>> # if __GLIBC_PREREQ(2,6)
>>         return *cpu_id = sched_getcpu();
>> # endif
>> #elif defined(__ia64__)
>> # if __GLIBC_PREREQ(2,6)
>>         return *cpu_id = sched_getcpu();
>> # endif
>> ....arm...sparc...xxx
> 
> In the glibc code I see sched_getcpu implementation only for x86_64, I 
> was looking into libc 2.7, that was the reason I implemented it only for 
> x86_64
>  You can see that implementation under:
>     sysdeps/unix/sysv/linux/sched_getcpu.c
> If glibc can support other archs we can remove the condition.I still 
> suggest you to add these architectures specifically rather than allowing 
> all till it becomes glibc generic.

Looking at the CVS version of glibc I don't see anything x86_64 specific 
in the sched_getcpu source. See the online version:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sched_getcpu.c?rev=1.3.2.1&content-type=text/x-cvsweb-markup&cvsroot=glibc

So, this call is available on all Linux architectures (not only x86_64).
If a architecture didn't implemented the getcpu kernel syscall, it just 
returns -1, which is OK and just leads to a correctly failed LTP test.

Based on this, I'm still convinced that my patch which I sent in my 
first post (http://permalink.gmane.org/gmane.linux.ltp/5424) is still 
correct.
Please, it would be nice if you would check again.

Best regards,
Helge


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to