home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / dos / remdosentry.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  2.1 KB  |  92 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: remdosentry.c,v 1.6 1997/01/27 00:36:28 ldp Exp $
  4.     $Log: remdosentry.c,v $
  5.     Revision 1.6  1997/01/27 00:36:28  ldp
  6.     Polish
  7.  
  8.     Revision 1.5  1996/12/09 13:53:39  aros
  9.     Added empty templates for all missing functions
  10.  
  11.     Moved #include's into first column
  12.  
  13.     Revision 1.4  1996/10/24 15:50:35  aros
  14.     Use the official AROS macros over the __AROS versions.
  15.  
  16.     Revision 1.3  1996/08/13 13:52:50  digulla
  17.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  18.     Replaced AROS_LA by AROS_LHA
  19.  
  20.     Revision 1.2  1996/08/01 17:40:57  digulla
  21.     Added standard header for all files
  22.  
  23.     Desc:
  24.     Lang: english
  25. */
  26. #include <dos/dosextens.h>
  27. #include <proto/utility.h>
  28.  
  29. /*****************************************************************************
  30.  
  31.     NAME */
  32. #include <proto/dos.h>
  33.  
  34.     AROS_LH1(LONG, RemDosEntry,
  35.  
  36. /*  SYNOPSIS */
  37.     AROS_LHA(struct DosList *, dlist, D1),
  38.  
  39. /*  LOCATION */
  40.     struct DosLibrary *, DOSBase, 112, Dos)
  41.  
  42. /*  FUNCTION
  43.     Removes a given dos list entry from the dos list. Automatically
  44.     locks the list for writing.
  45.  
  46.     INPUTS
  47.     dlist - pointer to dos list entry.
  48.  
  49.     RESULT
  50.     !=0 if all went well, 0 otherwise.
  51.  
  52.     NOTES
  53.     Since anybody who wants to use a device or volume node in the
  54.     dos list has to lock the list, filesystems may be called with
  55.     the dos list locked. So if you want to add a dos list entry
  56.     out of a filesystem don't just wait on the lock but serve all
  57.     incoming requests until the dos list is free instead.
  58.  
  59.     EXAMPLE
  60.  
  61.     BUGS
  62.  
  63.     SEE ALSO
  64.  
  65.     INTERNALS
  66.  
  67.     HISTORY
  68.     29-10-95    digulla automatically created from
  69.                 dos_lib.fd and clib/dos_protos.h
  70.  
  71. *****************************************************************************/
  72. {
  73.     AROS_LIBFUNC_INIT
  74.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  75.     struct DosList *dl;
  76.  
  77.     dl=LockDosList(LDF_ALL|LDF_WRITE);
  78.     for(;;)
  79.     {
  80.         if(dl->dol_Next==dlist)
  81.     {
  82.         dl->dol_Next=dlist->dol_Next;
  83.         break;
  84.     }
  85.     dl=dl->dol_Next;
  86.     }
  87.     UnLockDosList(LDF_ALL|LDF_WRITE);
  88.  
  89.     return 1;
  90.     AROS_LIBFUNC_EXIT
  91. } /* RemDosEntry */
  92.