changeset 2699:1c88a9bc6c8c lwtools-port

Reworked to make the searching of the paths in a process more efficient
author Boisy Pitre <boisy.pitre@nuance.com>
date Fri, 20 Jul 2012 13:11:04 -0500
parents 4a6ff73a2fa5
children 772a16760499
files level1/modules/dw3.asm
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/level1/modules/dw3.asm	Fri Jul 20 12:12:14 2012 -0500
+++ b/level1/modules/dw3.asm	Fri Jul 20 13:11:04 2012 -0500
@@ -453,17 +453,22 @@
 
 * This routine roots through process descriptors in a queue and
 * checks to see if the process has a path that is open to the device
-* represented by the static storage pointer in U. if so, the S$HUP
+* represented by the static storage pointer in U. If so, the S$HUP
 * signal is sent to that process
 *
+* Note: we start with path 0 and continue until we get to either (a) the
+* last path for that process or (b) a hit on the static storage that we
+* are seeking.
+*
 * Entry: X = process descriptor to evaluate
 *        U = static storage of device we want to check against
 RootThrough              
-               ldb       #NumPaths
+               clrb
                leay      P$Path,x
                pshs      x
-loop           decb      
-               bmi       out
+loop           cmpb      #NumPaths      
+               beq       out
+               incb
                lda       ,y+
                beq       loop
                pshs      y