On Friday 08 July 2005 13:33, Oleg Girko wrote:
> On Thursday 07 July 2005 21:31, Blaisorblade wrote:
> > I guess that in NPTL headers, instead of using __errno_location() the
> > faster "__thread int errno;" is used; Oleg, can you verify this?
>
> This is excerpt of <bits/errno.h> include file, which is included from
> <errno.h> on Fedora Core 4:
>
> [-- Begin of Excerpt --]
> # ifndef __ASSEMBLER__
> /* Function to get address of global `errno' variable.  */
> extern int *__errno_location (void) __THROW __attribute__ ((__const__));
>
> #  if !defined _LIBC || defined _LIBC_REENTRANT
> /* When using threads, errno is a per-thread value.  */
> #   define errno (*__errno_location ())
> #  endif
> # endif /* !__ASSEMBLER__ */
> [-- End of Excerpt --]

> Compiling a test program with "-E" switch shows that preprocessor replaces
> "errno" with "(*__errno_location ())".

Can you test on a UML file? Non urgent since my patch fixed it, but it would 
still be useful. (do a make ARCH=um V=1 to take the right command line, or 
even do make ARCH=um arch/um/<afile>.i and it will do everything by itself). 
Some file should be using kernel_errno and that's ok, the ones with _user.c 
(and the ones listed in USER_OBJS in their Makefile) should get the above 
def.

Hmm, that's more logical but now I'm left a bit without explaination. However 
the existance of two "errno" is enough to confuse it somehow, probably. And 
since you reported the fix works, we're ok.

> There are several definitions of __errno_location() function inside glibc
> sources, but they are inside "#ifdef"s, so I can't tell which of them is
> effective in glibc-2.3.5-10 RPM package used in Fedora Core 4.
Don't worry, I've studied the question time ago on older glibc with NPTL and 
I've got a good understanding of that.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

        

        
                
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to