Lines Matching full:unit
72 /* clock unit control structure */
74 short unit; /* NTP refclock unit number */ member
94 int unit, in psc_start() argument
102 if (unit < 0 || unit > 1) { /* support units 0 and 1 */ in psc_start()
103 msyslog(LOG_ERR, "psc_start: bad unit: %d", unit); in psc_start()
109 snprintf(buf, sizeof(buf), DEVICE, unit); /* dev file name */ in psc_start()
110 fd[unit] = open(buf, O_RDONLY); /* open device file */ in psc_start()
111 if (fd[unit] < 0) { in psc_start()
112 msyslog(LOG_ERR, "psc_start: unit: %d, open failed. %m", unit); in psc_start()
117 if (ioctl(fd[unit], PSC_REGS, ®p[unit]) < 0) { in psc_start()
118 msyslog(LOG_ERR, "psc_start: unit: %d, ioctl failed. %m", unit); in psc_start()
133 up->unit = unit; in psc_start()
144 int unit, in psc_shutdown() argument
150 if (fd[unit] > 0) in psc_shutdown()
151 close(fd[unit]); in psc_shutdown()
157 int unit, in psc_poll() argument
167 tlo = regp[unit]->low_time; /* latch and read first 4 bytes */ in psc_poll()
168 thi = regp[unit]->high_time; /* read 4 higher order bytes */ in psc_poll()
169 status = regp[unit]->device_status; /* read device status byte */ in psc_poll()
173 if (!up->msg_flag[unit]) { /* write once to system log */ in psc_poll()
175 "SYNCHRONIZATION LOST on unit %1d, status %02x\n", in psc_poll()
176 unit, status); in psc_poll()
177 up->msg_flag[unit] = 1; in psc_poll()
216 check_leap_sec(pp, unit); in psc_poll()
230 check_leap_sec(struct refclockproc *pp, int unit) in check_leap_sec() argument
235 regp[unit]->dp_ram_addr = DP_LEAPSEC_DAY10DAY1; in check_leap_sec()
237 dlo = regp[unit]->dp_ram_data; in check_leap_sec()
238 regp[unit]->dp_ram_addr = DP_LEAPSEC_DAY1000DAY100; in check_leap_sec()
240 dhi = regp[unit]->dp_ram_data; in check_leap_sec()