Lines Matching refs:udev_queue
46 struct udev_queue { struct
61 _public_ struct udev_queue *udev_queue_new(struct udev *udev) in udev_queue_new() argument
63 struct udev_queue *udev_queue; in udev_queue_new() local
68 udev_queue = new0(struct udev_queue, 1); in udev_queue_new()
69 if (udev_queue == NULL) in udev_queue_new()
72 udev_queue->refcount = 1; in udev_queue_new()
73 udev_queue->udev = udev; in udev_queue_new()
74 udev_queue->fd = -1; in udev_queue_new()
75 return udev_queue; in udev_queue_new()
86 _public_ struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue) in udev_queue_ref() argument
88 if (udev_queue == NULL) in udev_queue_ref()
91 udev_queue->refcount++; in udev_queue_ref()
92 return udev_queue; in udev_queue_ref()
104 _public_ struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue) in udev_queue_unref() argument
106 if (udev_queue == NULL) in udev_queue_unref()
109 udev_queue->refcount--; in udev_queue_unref()
110 if (udev_queue->refcount > 0) in udev_queue_unref()
113 safe_close(udev_queue->fd); in udev_queue_unref()
115 free(udev_queue); in udev_queue_unref()
127 _public_ struct udev *udev_queue_get_udev(struct udev_queue *udev_queue) in udev_queue_get_udev() argument
129 if (udev_queue == NULL) in udev_queue_get_udev()
131 return udev_queue->udev; in udev_queue_get_udev()
142 _public_ unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) in udev_queue_get_kernel_seqnum() argument
155 _public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) in udev_queue_get_udev_seqnum() argument
168 _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) in udev_queue_get_udev_is_active() argument
181 _public_ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue) in udev_queue_get_queue_is_empty() argument
197 _public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, in udev_queue_get_seqnum_sequence_is_finished() argument
200 return udev_queue_get_queue_is_empty(udev_queue); in udev_queue_get_seqnum_sequence_is_finished()
213 _public_ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long in… in udev_queue_get_seqnum_is_finished() argument
215 return udev_queue_get_queue_is_empty(udev_queue); in udev_queue_get_seqnum_is_finished()
226 _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) in udev_queue_get_queued_list_entry() argument
237 _public_ int udev_queue_get_fd(struct udev_queue *udev_queue) { in udev_queue_get_fd() argument
241 if (udev_queue->fd >= 0) in udev_queue_get_fd()
242 return udev_queue->fd; in udev_queue_get_fd()
255 udev_queue->fd = fd; in udev_queue_get_fd()
265 _public_ int udev_queue_flush(struct udev_queue *udev_queue) { in udev_queue_flush() argument
266 if (udev_queue->fd < 0) in udev_queue_flush()
269 return flush_fd(udev_queue->fd); in udev_queue_flush()