Changes between Version 12 and Version 13 of Old/NodeHandler/Broadcast


Ignore:
Timestamp:
Apr 10, 2006, 11:18:50 PM (18 years ago)
Author:
sswami
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/NodeHandler/Broadcast

    v12 v13  
    136136       END IF
    137137       Setup ACK list
    138        set flag = true
    139        WHILE (flag)
    140 
    141          trylock(ACK_list)
    142          IF (trylock successful)
    143            read ACK_list
    144            unlock(ACK_list)
    145          END IF
    146 
    147          IF (ACK_LIST_COMPLETE)
    148             flag = false
    149             return
    150          END IF
    151          IF (TIMEOUT)
    152            lock(pipe_access)
    153            send(pipe) "TIMEOUT" to NodeHandler
    154            unlock(pipe_access)
    155            break
    156          END IF
     138       set complete = 0
     139       WHILE (!complete)
    157140         sendto(BROADCAST_ADDR, message)  /* send/resend the message */
    158141         sleep(50ms)
     142
     143         lock(ACK_list)
     144         read ACK_list
     145         unlock(ACK_list)
     146         
     147         IF (ACK_LIST_COMPLETE)
     148            complete = 1
     149         END IF
    159150       END WHILE
    160151    END FUNCTION
     
    177168        ELSE IF (ACK_LIST_INCOMPLETE && TIMEOUT)
    178169           unlock(ACK_list)
    179            send "TIMEOUT" to main thread
     170           lock(pipe_access)
     171           send(pipe) "TIMEOUT" message to Nodehandler
     172           unlock(pipe_access)
    180173        END IF
    181174