home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / exec / freesignal.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-09  |  1.6 KB  |  81 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: freesignal.c,v 1.7 1997/01/01 03:46:10 ldp Exp $
  4.     $Log: freesignal.c,v $
  5.     Revision 1.7  1997/01/01 03:46:10  ldp
  6.     Committed Amiga native (support) code
  7.  
  8.     Changed clib to proto
  9.  
  10.     Revision 1.6  1996/12/10 13:51:46  aros
  11.     Moved all #include's in the first column so makedepend can see it.
  12.  
  13.     Revision 1.5  1996/10/24 15:50:50  aros
  14.     Use the official AROS macros over the __AROS versions.
  15.  
  16.     Revision 1.4  1996/08/13 13:56:02  digulla
  17.     Replaced AROS_LA by AROS_LHA
  18.     Replaced some AROS_LH*I by AROS_LH*
  19.     Sorted and added includes
  20.  
  21.     Revision 1.3  1996/08/01 17:41:12  digulla
  22.     Added standard header for all files
  23.  
  24.     Desc:
  25.     Lang: english
  26. */
  27. #include <exec/execbase.h>
  28. #include <exec/tasks.h>
  29. #include <aros/libcall.h>
  30. #include <proto/exec.h>
  31.  
  32. /*****************************************************************************
  33.  
  34.     NAME */
  35.  
  36.     AROS_LH1(void, FreeSignal,
  37.  
  38. /*  SYNOPSIS */
  39.     AROS_LHA(LONG, signalNum, D0),
  40.  
  41. /*  LOCATION */
  42.     struct ExecBase *, SysBase, 56, Exec)
  43.  
  44. /*  FUNCTION
  45.     Free a signal allocated with AllocSignal().
  46.  
  47.     INPUTS
  48.     signalNum - Number of the signal to free or -1 to do nothing.
  49.  
  50.     RESULT
  51.  
  52.     NOTES
  53.  
  54.     EXAMPLE
  55.  
  56.     BUGS
  57.  
  58.     SEE ALSO
  59.     AllocSignal(), Signal(), Wait()
  60.  
  61.     INTERNALS
  62.  
  63.     HISTORY
  64.  
  65. ******************************************************************************/
  66. {
  67.     AROS_LIBFUNC_INIT
  68.  
  69.     if(signalNum!=-1)
  70.     {
  71.     /* Nobody guarantees that the compiler will make it atomic. */
  72.     Forbid();
  73.  
  74.     /* Clear the bit */
  75.     SysBase->ThisTask->tc_SigAlloc&=~(1<<signalNum);
  76.     Permit();
  77.     }
  78.     AROS_LIBFUNC_EXIT
  79. }
  80.  
  81.