"Fossies" - the Fresh Open Source Software Archive

Member "threads/src/freebsd/sigprocmask.S" (8 Nov 2000, 1571 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   @(#)sigprocmask.S 3.14 11/8/00
   26 
   27 */
   28 
   29 #include <SYS.h>
   30 
   31 xerr:
   32     jmp _pthread_cerror
   33 
   34     .globl  _pthread_sigprocmask
   35 _pthread_sigprocmask:
   36     movl    8(%esp),%ecx        # fetch new sigset pointer
   37     cmpl    $0,%ecx         # check new sigset pointer
   38     jne 1f          # if not null, indirect
   39 /*  movl    $0,8(%esp)      # null mask pointer: block empty set */
   40     movl    $1,4(%esp)      # SIG_BLOCK
   41     jmp 2f
   42 1:  movl    (%ecx),%ecx     # fetch indirect  ...
   43     movl    %ecx,8(%esp)        # to new mask arg
   44 2:  movl    $ SYS_sigprocmask , %eax
   45     LCALL(0x7,0)
   46     jb  xerr
   47     movl    12(%esp),%ecx       # fetch old mask requested
   48     cmpl    $0,%ecx         # test if old mask requested
   49     je  out
   50     movl    %eax,(%ecx)     # store old mask
   51 out:
   52     xorl    %eax,%eax
   53     ret