worker 139 src/udev/udevd.c static inline struct worker *node_to_worker(struct udev_list_node *node) { worker 140 src/udev/udevd.c return container_of(node, struct worker, node); worker 149 src/udev/udevd.c static struct worker *worker_ref(struct worker *worker) { worker 150 src/udev/udevd.c worker->refcount++; worker 151 src/udev/udevd.c return worker; worker 154 src/udev/udevd.c static void worker_cleanup(struct worker *worker) { worker 155 src/udev/udevd.c udev_list_node_remove(&worker->node); worker 156 src/udev/udevd.c udev_monitor_unref(worker->monitor); worker 158 src/udev/udevd.c free(worker); worker 161 src/udev/udevd.c static void worker_unref(struct worker *worker) { worker 162 src/udev/udevd.c worker->refcount--; worker 163 src/udev/udevd.c if (worker->refcount > 0) worker 165 src/udev/udevd.c log_debug("worker [%u] cleaned up", worker->pid); worker 166 src/udev/udevd.c worker_cleanup(worker); worker 173 src/udev/udevd.c struct worker *worker = node_to_worker(loop); worker 175 src/udev/udevd.c worker_cleanup(worker); worker 181 src/udev/udevd.c struct worker *worker; worker 193 src/udev/udevd.c worker = new0(struct worker, 1); worker 194 src/udev/udevd.c if (worker == NULL) { worker 199 src/udev/udevd.c worker->refcount = 2; worker 200 src/udev/udevd.c worker->udev = udev; worker 216 src/udev/udevd.c free(worker); worker 399 src/udev/udevd.c free(worker); worker 405 src/udev/udevd.c worker->monitor = worker_monitor; worker 406 src/udev/udevd.c worker->pid = pid; worker 407 src/udev/udevd.c worker->state = WORKER_RUNNING; worker 408 src/udev/udevd.c worker->event_start_usec = now(CLOCK_MONOTONIC); worker 409 src/udev/udevd.c worker->event_warned = false; worker 410 src/udev/udevd.c worker->event = event; worker 412 src/udev/udevd.c udev_list_node_append(&worker->node, &worker_list); worker 423 src/udev/udevd.c struct worker *worker = node_to_worker(loop); worker 426 src/udev/udevd.c if (worker->state != WORKER_IDLE) worker 429 src/udev/udevd.c count = udev_monitor_send_device(monitor, worker->monitor, event->dev); worker 431 src/udev/udevd.c log_error("worker [%u] did not accept message %zi (%m), kill it", worker->pid, count); worker 432 src/udev/udevd.c kill(worker->pid, SIGKILL); worker 433 src/udev/udevd.c worker->state = WORKER_KILLED; worker 436 src/udev/udevd.c worker_ref(worker); worker 437 src/udev/udevd.c worker->event = event; worker 438 src/udev/udevd.c worker->state = WORKER_RUNNING; worker 439 src/udev/udevd.c worker->event_start_usec = now(CLOCK_MONOTONIC); worker 440 src/udev/udevd.c worker->event_warned = false; worker 484 src/udev/udevd.c struct worker *worker = node_to_worker(loop); worker 486 src/udev/udevd.c if (worker->state == WORKER_KILLED) worker 489 src/udev/udevd.c worker->state = WORKER_KILLED; worker 490 src/udev/udevd.c kill(worker->pid, SIGTERM); worker 608 src/udev/udevd.c struct worker *worker = node_to_worker(loop); worker 610 src/udev/udevd.c if (worker->pid != msg.pid) worker 614 src/udev/udevd.c if (worker->event) { worker 615 src/udev/udevd.c worker->event->exitcode = msg.exitcode; worker 616 src/udev/udevd.c event_queue_delete(worker->event); worker 617 src/udev/udevd.c worker->event = NULL; worker 619 src/udev/udevd.c if (worker->state != WORKER_KILLED) worker 620 src/udev/udevd.c worker->state = WORKER_IDLE; worker 621 src/udev/udevd.c worker_unref(worker); worker 873 src/udev/udevd.c struct worker *worker = node_to_worker(loop); worker 875 src/udev/udevd.c if (worker->pid != pid) worker 895 src/udev/udevd.c if (worker->event) { worker 897 src/udev/udevd.c pid, worker->event->devpath); worker 898 src/udev/udevd.c worker->event->exitcode = -32; worker 899 src/udev/udevd.c event_queue_delete(worker->event); worker 902 src/udev/udevd.c worker_unref(worker); worker 905 src/udev/udevd.c worker_unref(worker); worker 1410 src/udev/udevd.c struct worker *worker = node_to_worker(loop); worker 1413 src/udev/udevd.c if (worker->state != WORKER_RUNNING) worker 1418 src/udev/udevd.c if ((ts - worker->event_start_usec) > arg_event_timeout_warn_usec) { worker 1419 src/udev/udevd.c if ((ts - worker->event_start_usec) > arg_event_timeout_usec) { worker 1420 src/udev/udevd.c log_error("worker [%u] %s timeout; kill it", worker->pid, worker->event->devpath); worker 1421 src/udev/udevd.c kill(worker->pid, SIGKILL); worker 1422 src/udev/udevd.c worker->state = WORKER_KILLED; worker 1425 src/udev/udevd.c worker_unref(worker); worker 1426 src/udev/udevd.c log_error("seq %llu '%s' killed", udev_device_get_seqnum(worker->event->dev), worker->event->devpath); worker 1427 src/udev/udevd.c worker->event->exitcode = -64; worker 1428 src/udev/udevd.c event_queue_delete(worker->event); worker 1429 src/udev/udevd.c worker->event = NULL; worker 1430 src/udev/udevd.c } else if (!worker->event_warned) { worker 1431 src/udev/udevd.c log_warning("worker [%u] %s is taking a long time", worker->pid, worker->event->devpath); worker 1432 src/udev/udevd.c worker->event_warned = true;