[Contents] [Index] [Help] [Retrace] [browse <] [Browse >]


NAME
    RemDevice -- remove a device from the system

SYNOPSIS
    RemDevice(device)
              A1

    void RemDevice(struct device *);

FUNCTION
    This function calls the device's EXPUNGE vector, which requests
    that a device delete itself.  The device may refuse to do this if
    it is busy or currently open. This is not typically called by user
    code.

    There are certain, limited circumstances where it may be
    appropriate to attempt to specifically flush a certain device.
    Example:

     /* Attempts to flush the named device out of memory. */
     #include <exec/types.h>
     #include <exec/execbase.h>

     void FlushDevice(name)
     STRPTR name;
     {
     struct device *result;

        Forbid();
        if(result=(struct device *)findname(&sysbase->devicelist,name))
            RemDevice(result);
        Permit();
     }

INPUTS
    device - pointer to a device node

SEE ALSO
    addlibrary