"Fossies" - the Fresh Open Source Software Archive

Member "threads/src/freebsd/cerror.S" (8 Nov 2000, 1162 Bytes) of package /linux/misc/old/pthreads-3.14.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PowerPC Assembler source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /* Copyright (C) 1992-2000 the Florida State University
    2    Distributed by the Florida State University under the terms of the
    3    GNU Library General Public License.
    4 
    5 This file is part of Pthreads.
    6 
    7 Pthreads is free software; you can redistribute it and/or
    8 modify it under the terms of the GNU Library General Public
    9 License as published by the Free Software Foundation (version 2).
   10 
   11 Pthreads is distributed "AS IS" in the hope that it will be
   12 useful, but WITHOUT ANY WARRANTY; without even the implied
   13 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   14 See the GNU Library General Public License for more details.
   15 
   16 You should have received a copy of the GNU Library General Public
   17 License along with Pthreads; see the file COPYING.  If not, write
   18 to the Free Software Foundation, 675 Mass Ave, Cambridge,
   19 MA 02139, USA.
   20 
   21 Report problems and direct all questions to:
   22 
   23   pthreads-bugs@ada.cs.fsu.edu
   24 
   25   @(#)cerror.S  3.14 11/8/00
   26 
   27 */
   28 
   29 #include <SYS.h>
   30 
   31     .globl  _errno
   32         .globl _pthread_cerror
   33 _pthread_cerror:
   34 #ifdef PIC
   35     PIC_PROLOGUE
   36     movl    PIC_GOT(_errno),%ecx
   37     movl    %eax,(%ecx)
   38     PIC_EPILOGUE
   39 #else
   40     movl    %eax,_errno
   41 #endif
   42     movl    $-1,%eax
   43     ret