Lines Matching refs:sensor

215 #pragma mark sensor
316 exclaves_sensor_t *sensor = sensor_type_to_sensor(i); in exclaves_sensor_init() local
318 lck_mtx_init(&sensor->s_mutex, &sensor_lck_grp, NULL); in exclaves_sensor_init()
320 sensor->s_startcount = 0; in exclaves_sensor_init()
321 sensor->s_initialised = true; in exclaves_sensor_init()
340 exclaves_sensor_t *sensor = sensor_type_to_sensor(sensor_type); in exclaves_sensor_start() local
341 if (!sensor->s_initialised) { in exclaves_sensor_start()
345 lck_mtx_lock(&sensor->s_mutex); in exclaves_sensor_start()
348 if (sensor->s_startcount == UINT64_MAX) { in exclaves_sensor_start()
349 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_start()
353 if (sensor->s_startcount > 0) { in exclaves_sensor_start()
356 sensor->s_startcount += 1; in exclaves_sensor_start()
358 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_start()
365 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_start()
369 sensor->s_start_abs = mach_absolute_time(); in exclaves_sensor_start()
370 sensor->s_startcount += 1; in exclaves_sensor_start()
372 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_start()
388 exclaves_sensor_t *sensor = sensor_type_to_sensor(sensor_type); in exclaves_sensor_stop() local
389 if (!sensor->s_initialised) { in exclaves_sensor_stop()
395 lck_mtx_lock(&sensor->s_mutex); in exclaves_sensor_stop()
397 if (sensor->s_startcount == 0) { in exclaves_sensor_stop()
398 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_stop()
402 if (sensor->s_startcount > 1) { in exclaves_sensor_stop()
405 sensor->s_startcount -= 1; in exclaves_sensor_stop()
407 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_stop()
414 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_stop()
418 sensor->s_stop_abs = mach_absolute_time(); in exclaves_sensor_stop()
419 sensor->s_startcount = 0; in exclaves_sensor_stop()
423 lck_mtx_unlock(&sensor->s_mutex); in exclaves_sensor_stop()
436 exclaves_sensor_t *sensor = sensor_type_to_sensor(sensor_type); in exclaves_sensor_status() local
437 if (!sensor->s_initialised) { in exclaves_sensor_status()
451 exclaves_sensor_t *sensor = sensor_type_to_sensor(EXCLAVES_SENSOR_CAM); in exclaves_sensor_tick_rate() local
452 if (!sensor->s_initialised) { in exclaves_sensor_tick_rate()
474 exclaves_sensor_t *sensor = sensor_type_to_sensor(EXCLAVES_SENSOR_CAM); in exclaves_sensor_copy() local
475 if (!sensor->s_initialised) { in exclaves_sensor_copy()
496 exclaves_sensor_t *sensor = sensor_type_to_sensor(EXCLAVES_SENSOR_CAM); in exclaves_indicator_min_on_time_deadlines() local
497 if (!sensor->s_initialised) { in exclaves_indicator_min_on_time_deadlines()