Lines Matching full:handle
202 * create PPS handle from file descriptor
208 pps_handle_t *handle /* returned handle */ in time_pps_create() argument
215 if (!handle) { in time_pps_create()
229 *handle = malloc(sizeof(pps_unit_t)); in time_pps_create()
230 if (!(*handle)) { in time_pps_create()
235 memset(*handle, 0, sizeof(pps_unit_t)); in time_pps_create()
236 (*handle)->filedes = filedes; in time_pps_create()
237 (*handle)->params.api_version = PPS_API_VERS_1; in time_pps_create()
238 (*handle)->params.mode = PPS_CAPTUREASSERT | PPS_TSFMT_TSPEC; in time_pps_create()
243 * release PPS handle
248 pps_handle_t handle in time_pps_destroy() argument
255 if (!handle) { in time_pps_destroy()
257 return (-1); /* bad handle */ in time_pps_destroy()
259 free(handle); in time_pps_destroy()
264 * set parameters for handle
269 pps_handle_t handle, in time_pps_setparams() argument
278 if (!handle) { in time_pps_setparams()
280 return (-1); /* bad handle */ in time_pps_setparams()
319 mode = handle->params.mode; in time_pps_setparams()
320 memcpy(&handle->params, params, sizeof(pps_params_t)); in time_pps_setparams()
321 handle->params.api_version = PPS_API_VERS_1; in time_pps_setparams()
322 handle->params.mode = mode | mode_in; in time_pps_setparams()
327 * get parameters for handle
332 pps_handle_t handle, in time_pps_getparams() argument
340 if (!handle) { in time_pps_getparams()
342 return (-1); /* bad handle */ in time_pps_getparams()
350 memcpy(params, &handle->params, sizeof(pps_params_t)); in time_pps_getparams()
355 * get capabilities for handle
360 pps_handle_t handle, in time_pps_getcap() argument
368 if (!handle) { in time_pps_getcap()
370 return (-1); /* bad handle */ in time_pps_getcap()
387 pps_handle_t handle, in time_pps_fetch() argument
403 if (!handle) { in time_pps_fetch()
405 return (-1); /* bad handle */ in time_pps_fetch()
424 if (!handle->params.mode & PPS_CAPTUREASSERT) { in time_pps_fetch()
435 if (ioctl(handle->filedes, CIOGETEV, (caddr_t) &ev) < 0) { in time_pps_fetch()
450 if (handle->params.mode & PPS_OFFSETASSERT) { in time_pps_fetch()
451 infobuf.assert_timestamp.tv_sec += handle->params.assert_offset.tv_sec; in time_pps_fetch()
452 infobuf.assert_timestamp.tv_nsec += handle->params.assert_offset.tv_nsec; in time_pps_fetch()
473 infobuf.current_mode = handle->params.mode; in time_pps_fetch()
484 pps_handle_t handle, in time_pps_kcbind() argument
492 if (!handle) { in time_pps_kcbind()
494 return (-1); /* bad handle */ in time_pps_kcbind()