Lines Matching refs:up

222 	struct shmunit *      const up = emalloc_zero(sizeof(*up));  in shm_start()  local
229 up->forall = (unit >= 2) && !(peer->ttl & SHM_MODE_PRIVATE); in shm_start()
231 up->shm = getShmTime(unit, up->forall); in shm_start()
237 if (up->shm != 0) { in shm_start()
238 pp->unitptr = up; in shm_start()
239 up->shm->precision = PRECISION; in shm_start()
240 peer->precision = up->shm->precision; in shm_start()
241 up->shm->valid = 0; in shm_start()
242 up->shm->nsamples = NSAMPLES; in shm_start()
245 up->max_delay = 5; in shm_start()
246 up->max_delta = 4*3600; in shm_start()
249 free(up); in shm_start()
272 struct shmunit * const up = pp->unitptr; in shm_control() local
277 if (NULL == up) in shm_control()
280 up->max_delta = 0; in shm_control()
282 up->max_delta = 4*3600; in shm_control()
284 up->max_delta = (time_t)floor(pp->fudgetime2 + 0.5); in shm_control()
298 struct shmunit * const up = pp->unitptr; in shm_shutdown() local
301 if (NULL == up) in shm_shutdown()
306 (void)shmdt((char *)up->shm); in shm_shutdown()
310 UnmapViewOfFile(up->shm); in shm_shutdown()
313 free(up); in shm_shutdown()
327 struct shmunit * const up = pp->unitptr; in shm_poll() local
333 major_error = max(up->notready, up->bad); in shm_poll()
334 major_error = max(major_error, up->clash); in shm_poll()
345 } else if (NULL == up->shm) { /* is this possible at all? */ in shm_poll()
348 } else if (major_error == up->clash) { in shm_poll()
351 } else if (major_error == up->bad) { in shm_poll()
523 struct shmunit * const up = pp->unitptr; in shm_timer() local
539 up->ticks++; in shm_timer()
540 if ((shm = up->shm) == NULL) { in shm_timer()
543 shm = up->shm = getShmTime(unit, up->forall); in shm_timer()
564 up->notready++; in shm_timer()
569 up->bad++; in shm_timer()
577 up->clash++; in shm_timer()
583 up->bad++; in shm_timer()
608 if (tt < 0 || tt > up->max_delay) { in shm_timer()
611 up->bad++; in shm_timer()
621 if (up->max_delta > 0 && tt > up->max_delta) { in shm_timer()
624 up->bad++; in shm_timer()
638 up->good++; in shm_timer()
650 struct shmunit * const up = pp->unitptr; in shm_clockstats() local
656 up->ticks, up->good, up->notready, in shm_clockstats()
657 up->bad, up->clash); in shm_clockstats()
659 up->ticks = up->good = up->notready = up->bad = up->clash = 0; in shm_clockstats()