home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / MSDOS / GOPHER / PC_SERVE / KA9Q / ALG.DOC next >
Encoding:
Text File  |  1993-09-19  |  759 b   |  33 lines

  1.  if (room in clist and process is sleeping waiting for room)
  2.    clear flag indecating user process is sleeping
  3.    wake up sleeping process
  4.  
  5.  if (clist is empty)
  6.    clear device busy flag
  7.    if (someone is sleeping waiting to close )
  8.      wake up process 
  9.  else if (timeout pending flag is clear )
  10.   request that lprestart be called in a tenth of a second
  11.   set timeout pending flag 
  12.  enable device interrupts
  13.  
  14.  
  15.  
  16. intr entry point :
  17.   if (device busy flag is clear )
  18.     return (i.e. interrupt is spurious)
  19.  
  20.   if (there is at least one byte in the clist buffer)
  21.     call lpwork to try to print it 
  22.  
  23.   
  24.  
  25. lp restart routing :
  26.    clear the timeout pending flag 
  27.    raise processor  priority (disable interrupts)
  28.    call lpwork 
  29.    restore processor priority
  30.  
  31.  
  32.   
  33.