1 " ***********************************************************
 2 " *                                                         *
 3 " * Copyright, (C) Honeywell Bull Inc., 1987                *
 4 " *                                                         *
 5 " * Copyright, (C) Honeywell Information Systems Inc., 1982 *
 6 " *                                                         *
 7 " * Copyright (c) 1972 by Massachusetts Institute of        *
 8 " * Technology and Honeywell Information Systems, Inc.      *
 9 " *                                                         *
10 " ***********************************************************
11 
12 "
13 "         check_trailer
14 "
15 "         This program loops through the entire trailer segment searching
16 "         for any trailers which belong to a process which has been (is being)
17 "         destroyed.  It is a debugging temporary program only.
18 "
19 " Modified 04/16/81, W. Olin Sibert, to get count of trailers from sst$n_trailers
20 "
21 
22           name      check_trailer
23           entry     check_trailer
24 
25 check_trailer:
26 
27 "
28 "         Call is:
29 "
30 "         error = check_trailer(rel_dstep)
31 "
32 "         dcl error bit (1) aligned, rel_dstep dixed bin (18)
33 "
34           lda       pr0|2,*             pick up the pointer to the DST entry
35           stz       pr0|4,*             zero out return error code
36 
37           ldq       sst$n_trailers      get count of trailers in system
38           qls       1                   multiply by two (size of a trailer)
39           eax0      0,ql                and move to X0
40 
41           ldq       -1,du               use mask for right half of word 1 of trailer entry
42           epp2      str_seg$+0          get pointer to trailer segment itself
43 
44 loop:     eax0      -2,x0               go to next trailer
45           tmi       ok                  if haven't found bad one by now we're OK
46           cmk       pr2|1,x0            compare a with rel(dstep) in trailer
47           tze       trouble             the same, trouble. return "1"b
48           tra       loop
49 
50 ok:       short_return
51 
52 trouble:  lda       =o400000,du         return "1"b if error
53           sta       pr0|4,*
54           short_return
55 
56           end