Date: Wed, 18 Apr 2007 11:14:47 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 118357 for review Message-ID: <200704181114.l3IBElPS013724@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=118357 Change 118357 by gonzo@gonzo_jeeves on 2007/04/18 11:14:28 o Leave only REENTRANT version and call __error instead of __errno. Affected files ... .. //depot/projects/mips2/src/lib/libc/mips/sys/cerror.S#3 edit .. //depot/projects/mips2/src/lib/libc/mips/sys/ptrace.S#2 edit Differences ... ==== //depot/projects/mips2/src/lib/libc/mips/sys/cerror.S#3 (text+ko) ==== @@ -39,8 +39,15 @@ ASMSTR("$NetBSD: cerror.S,v 1.13 2003/08/07 16:42:17 agc Exp $") #endif /* LIBC_SCCS and not lint */ -#ifdef _REENTRANT - .globl _C_LABEL(__errno) + + /* + * The __error() function is thread aware. For non-threaded + * programs and the initial threaded in threaded programs, + * it returns a pointer to the global errno variable. + */ + .globl _C_LABEL(__error) + .type _C_LABEL(__error),%function + LEAF(__cerror) .frame sp, CALLFRAME_SIZ, ra PIC_PROLOGUE(__cerror, t9) @@ -49,7 +56,7 @@ sw ra, CALLFRAME_RA(sp) sw v0, 12(sp) # save errno value - la t9, _C_LABEL(__errno) # locate address of errno + la t9, _C_LABEL(__error) # locate address of errno jalr t9 lw t0, 12(sp) @@ -60,16 +67,3 @@ li v1, -1 j ra END(__cerror) -#else - .globl _C_LABEL(errno) -LEAF(__cerror) - .set noreorder -#ifdef __ABICALLS__ - .cpload t9 -#endif - sw v0, _C_LABEL(errno) - li v0, -1 - j ra - li v1, -1 -END(__cerror) -#endif /* _REENTRANT */ ==== //depot/projects/mips2/src/lib/libc/mips/sys/ptrace.S#2 (text+ko) ==== @@ -45,7 +45,9 @@ .cpload t9 .set reorder #endif - sw zero, _C_LABEL(errno) + la t9, _C_LABEL(__error) # locate address of errno + jalr t9 + sw zero, 0(v0) li v0, SYS_ptrace syscall bne a3, zero, 1f
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704181114.l3IBElPS013724>