[comp.sys.amiga] CloseDevice from task

thywiss@csvax.cs.ukans.edu (John A. Thywissen) (05/03/89)

Richard L. Carson asks if a CloseDevice() can be done from a task.

There should be no problem, assuming your device driver doesen't do
something really wild.

Rationale:  yes, the CloseDriver() could end up running a call to
DOS's UnloadSeg(), if there is a DELayed EXPunge pending, but so
could AllocMem().  (If AllocMem() runs out of RAM, it will Expunge
devices and libraries that aren't open.)  Therefore if AllocMem()
is safe in tasks, CloseDevice() is.  (Again, assuming the device
doesn't do anything unusual--which is shouldn't REALLY do.)

John
-------
John A. Thywissen                 <thywiss@csvax.cs.ukans.edu>
1122 West Campus Rd.  Rm. 213     Senior, University of Kansas 
Lawrence, KS  66045-8081              Dept. of Computer Science
(913) 864 2646                    Amiga Developer/Guru