Lines Matching +full:- +full:- +full:valid +full:- +full:-
2 * sht.c - Testprogram for shared memory refclock
26 int mode; /* 0 - if valid set
28 * clear valid
29 * 1 - if valid set
32 * clear valid
42 volatile int valid; member
54 if (shmid==-1) { in getShmTime()
60 if ((int)(long)p==-1) { in getShmTime()
128 printf (" c clear valid-flag\n"); in main()
133 printf (" pnnnn set precision to -nnn\n"); in main()
150 p->nsamples=atoi(argp+1); in main()
154 p->leap=atoi(argp+1); in main()
158 p->precision=-atoi(argp+1); in main()
174 p->mode,p->count, in main()
175 (long)p->clockTimeStampSec,p->clockTimeStampNSec, in main()
176 (long)p->receiveTimeStampSec,p->receiveTimeStampNSec); in main()
177 printf (" leap=%d, precision=%d, nsamples=%d, valid=%d\n", in main()
178 p->leap, p->precision, p->nsamples, p->valid); in main()
179 if (!p->valid) in main()
182 p->valid=0; in main()
203 /* Here we have a high-resolution system clock, and in main()
219 clk_frc = rcv_frc + (u_int)(random()%7094713 - 3547356); in main()
220 /* normalise result -- the SHM driver is picky! */ in main()
223 clk_sec -= 1; in main()
226 clk_frc -= 1000000000; in main()
238 p->mode=0; in main()
239 if (!p->valid) { in main()
240 p->clockTimeStampSec = clk_sec; in main()
241 p->clockTimeStampUSec = clk_frc / 1000; /* truncate! */ in main()
242 p->clockTimeStampNSec = clk_frc; in main()
243 p->receiveTimeStampSec = rcv_sec; in main()
244 p->receiveTimeStampUSec = rcv_frc / 1000; /* truncate! */ in main()
245 p->receiveTimeStampNSec = rcv_frc; in main()
247 (long)p->clockTimeStampSec , p->clockTimeStampNSec , in main()
248 (long)p->receiveTimeStampSec, p->receiveTimeStampNSec); in main()
249 p->valid=1; in main()
252 printf ("p->valid still set\n"); /* not an error! */ in main()