home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / signals / src / freesignal.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.1 KB  |  66 lines

  1. /*
  2.     $Id$
  3.     $Log$
  4.     Desc:
  5.     Lang: english
  6. */
  7. #include "exec_intern.h"
  8. #include <exec/execbase.h>
  9. #include <exec/tasks.h>
  10. #include <aros/libcall.h>
  11.  
  12. /*****************************************************************************
  13.  
  14.     NAME */
  15.     #include <clib/exec_protos.h>
  16.  
  17.     __AROS_LH1(void, FreeSignal,
  18.  
  19. /*  SYNOPSIS */
  20.     __AROS_LA(long, signalNum, D0),
  21.  
  22. /*  LOCATION */
  23.     struct ExecBase *, SysBase, 56, Exec)
  24.  
  25. /*  FUNCTION
  26.     Free a signal allocated with AllocSignal().
  27.  
  28.     INPUTS
  29.     signalNum - Number of the signal to free or -1 to do nothing.
  30.  
  31.     RESULT
  32.  
  33.     NOTES
  34.  
  35.     EXAMPLE
  36.  
  37.     BUGS
  38.  
  39.     SEE ALSO
  40.     AllocSignal(), Signal(), Wait()
  41.  
  42.     INTERNALS
  43.  
  44.     HISTORY
  45.     29-10-95    digulla automatically created from
  46.                 exec_lib.fd and clib/exec_protos.h
  47.     17-12-95    digulla Incorporated code by Matthias Fleischner
  48.  
  49. *****************************************************************************/
  50. {
  51.     __AROS_FUNC_INIT
  52.  
  53.     if (signalNum!=-1)
  54.     {
  55.     /* Nobody guarantees that the compiler will make it atomic. */
  56.     Forbid();
  57.  
  58.     /* Clear the bit */
  59.     SysBase->ThisTask->tc_SigAlloc &= ~(1 << signalNum);
  60.  
  61.     Permit();
  62.     }
  63.  
  64.     __AROS_FUNC_EXIT
  65. } /* FreeSignal */
  66.