Lines Matching defs:up

217     discard up to half the results in the filter.  It looks like maybe
230 MSF---thus we should never end up syncing to completely the wrong
266 * Add very slow auto-adjustment up to a value of +/- time2 to correct
553 arc_start, /* start up driver */
562 /* Queue us up for the next tick. */
563 #define ENQUEUE(up) \
568 /* Placeholder event handler---does nothing safely---soaks up loose tick. */
596 register struct arcunit *up = pp->unitptr;
603 c = up->cmdqueue[0]; /* Next char to be sent. */
606 { up->cmdqueue[i] = up->cmdqueue[i+1]; }
618 ENQUEUE(up);
630 register struct arcunit *up;
703 up = emalloc_zero(sizeof(*up));
712 free(up);
715 pp->unitptr = up;
745 up->next_resync = current_time + INITIAL_RESYNC_DELAY + (67*unit)%1009;
748 up->resyncing = 0; /* Not resyncing yet. */
749 up->saved_flags = 0; /* Default is all flags off. */
753 for(i = CMDQUEUELEN; i >= 0; --i) { up->cmdqueue[i] = '\0'; }
758 up->quality = QUALITY_UNKNOWN; /* Trust the clock immediately. */
760 up->quality = MIN_CLOCK_QUALITY;/* Don't trust the clock yet. */
765 ENQUEUE(up);
780 register struct arcunit *up;
786 up = pp->unitptr;
789 if (NULL != up)
790 free(up);
798 register struct arcunit *up
805 { if(up->cmdqueue[CMDQUEUELEN - 1 - spaceleft] != '\0') { break; } }
817 register struct arcunit *up,
823 int spaceleft = space_left(up);
837 while(*s && spaceleft > 0) { up->cmdqueue[CMDQUEUELEN - spaceleft--] = *s++; }
876 register struct arcunit *up;
891 up = pp->unitptr;
898 if((up->resyncing) && (space_left(up) == CMDQUEUELEN)) {
902 send_slow(up, pp->io.fd, "g\r");
1001 if(L_ISZERO(&(up->lastrec)) ||
1002 L_ISGEQ(&(up->lastrec), &timestamp))
1009 if(!L_ISZERO(&(up->lastrec))) {
1011 diff = up->lastrec;
1019 up->lastrec = timestamp;
1053 L_CLR(&(up->lastrec));
1077 if (up->quality_stamp < current_time) {
1083 up->quality_stamp =
1094 } else if( /* (r == '2') && */ up->resyncing) {
1095 up->quality = quality_average;
1100 up->quality,
1101 quality_action(up->quality));
1106 up->quality,
1107 quality_action(up->quality));
1108 up->resyncing = 0; /* Resync is over. */
1115 if((up->quality == QUALITY_UNKNOWN) ||
1116 (up->quality < MIN_CLOCK_QUALITY_OK))
1117 { up->next_resync = current_time + RETRY_RESYNC_TIME; }
1141 if(L_ISZERO(&(up->lastrec))) {
1155 pp->a_lastcode[pp->lencode] = ((up->quality == QUALITY_UNKNOWN) ?
1156 '6' : ('0' + up->quality));
1252 if(status != up->status)
1255 if(status != up->status) {
1258 up->status = status;
1264 up->status = status;
1393 if(up->quality == QUALITY_UNKNOWN) {
1403 } else if (up->quality == QUALITY_UNKNOWN) {
1412 if(up->saved_flags != pp->sloppyclockflag) {
1424 up->saved_flags = pp->sloppyclockflag;
1428 pp->lastrec = up->lastrec;
1468 register struct arcunit *up = pp->unitptr;
1472 if (!send_slow(up, pp->io.fd, "o\r")) {
1494 register struct arcunit *up;
1499 up = pp->unitptr;
1512 (up->next_resync <= current_time) );
1521 leap-second insertion or deletion for up to a whole sample
1533 (!up->resyncing)) { /* No resync in progress yet. */
1545 up->quality = QUALITY_UNKNOWN;
1548 up->resyncing = 1;
1555 send_slow(up, pp->io.fd, "h\r");
1558 up->next_resync = current_time + DEFAULT_RESYNC_TIME;
1570 (up->quality != QUALITY_UNKNOWN) &&
1572 (up->quality == QUALITY_UNKNOWN) ||
1574 (up->quality < MIN_CLOCK_QUALITY_OK)) {
1577 printf("arc: clock quality %d too poor.\n", up->quality);