HelenOS sources
polling 203 uspace/drv/bus/usb/usbhub/usbhub.c free(hub->polling.buffer);
polling 204 uspace/drv/bus/usb/usbhub/usbhub.c usb_polling_fini(&hub->polling);
polling 240 uspace/drv/bus/usb/usbhub/usbhub.c usb_polling_join(&hub->polling);
polling 261 uspace/drv/bus/usb/usbhub/usbhub.c usb_polling_join(&hub->polling);
polling 277 uspace/drv/bus/usb/usbhub/usbhub.c usb_polling_t *polling = &hub_dev->polling;
polling 279 uspace/drv/bus/usb/usbhub/usbhub.c if ((err = usb_polling_init(polling)))
polling 282 uspace/drv/bus/usb/usbhub/usbhub.c polling->device = hub_dev->usb_device;
polling 283 uspace/drv/bus/usb/usbhub/usbhub.c polling->ep_mapping = mapping;
polling 284 uspace/drv/bus/usb/usbhub/usbhub.c polling->request_size = ((hub_dev->port_count + 1 + 7) / 8);
polling 285 uspace/drv/bus/usb/usbhub/usbhub.c polling->buffer = malloc(polling->request_size);
polling 286 uspace/drv/bus/usb/usbhub/usbhub.c polling->on_data = hub_port_changes_callback;
polling 287 uspace/drv/bus/usb/usbhub/usbhub.c polling->on_error = usb_hub_polling_error_callback;
polling 288 uspace/drv/bus/usb/usbhub/usbhub.c polling->arg = hub_dev;
polling 290 uspace/drv/bus/usb/usbhub/usbhub.c if ((err = usb_polling_start(polling))) {
polling 292 uspace/drv/bus/usb/usbhub/usbhub.c free(polling->buffer);
polling 293 uspace/drv/bus/usb/usbhub/usbhub.c usb_polling_fini(polling);
polling 66 uspace/drv/bus/usb/usbhub/usbhub.h usb_polling_t polling;
polling 411 uspace/drv/hid/atkbd/atkbd.c kbd->polling_fibril = fibril_create(polling, kbd);
polling 94 uspace/drv/hid/usbhid/main.c rc = usb_polling_start(&hid_dev->polling);
polling 116 uspace/drv/hid/usbhid/main.c usb_polling_join(&hid_dev->polling);
polling 523 uspace/drv/hid/usbhid/usbhid.c usb_polling_t *polling = &hid_dev->polling;
polling 524 uspace/drv/hid/usbhid/usbhid.c if ((rc = usb_polling_init(polling))) {
polling 529 uspace/drv/hid/usbhid/usbhid.c polling->device = hid_dev->usb_dev;
polling 530 uspace/drv/hid/usbhid/usbhid.c polling->ep_mapping = hid_dev->poll_pipe_mapping;
polling 531 uspace/drv/hid/usbhid/usbhid.c polling->request_size = hid_dev->poll_pipe_mapping->pipe.desc.max_transfer_size;
polling 532 uspace/drv/hid/usbhid/usbhid.c polling->buffer = malloc(polling->request_size);
polling 533 uspace/drv/hid/usbhid/usbhid.c polling->on_data = usb_hid_polling_callback;
polling 534 uspace/drv/hid/usbhid/usbhid.c polling->on_polling_end = usb_hid_polling_ended_callback;
polling 535 uspace/drv/hid/usbhid/usbhid.c polling->on_error = usb_hid_polling_error_callback;
polling 536 uspace/drv/hid/usbhid/usbhid.c polling->arg = hid_dev;
polling 557 uspace/drv/hid/usbhid/usbhid.c free(hid_dev->polling.buffer);
polling 558 uspace/drv/hid/usbhid/usbhid.c usb_polling_fini(&hid_dev->polling);
polling 110 uspace/drv/hid/usbhid/usbhid.h usb_polling_t polling;
polling 439 uspace/drv/hid/xtkbd/xtkbd.c kbd->polling_fibril = fibril_create(polling, kbd);
polling 64 uspace/lib/usbdev/src/devpoll.c int usb_polling_init(usb_polling_t *polling)
polling 66 uspace/lib/usbdev/src/devpoll.c if (!polling)
polling 70 uspace/lib/usbdev/src/devpoll.c memset(polling, 0, sizeof(usb_polling_t));
polling 73 uspace/lib/usbdev/src/devpoll.c fibril_mutex_initialize(&polling->guard);
polling 74 uspace/lib/usbdev/src/devpoll.c fibril_condvar_initialize(&polling->cv);
polling 77 uspace/lib/usbdev/src/devpoll.c polling->auto_clear_halt = true;
polling 78 uspace/lib/usbdev/src/devpoll.c polling->delay = -1;
polling 79 uspace/lib/usbdev/src/devpoll.c polling->max_failures = 3;
polling 90 uspace/lib/usbdev/src/devpoll.c void usb_polling_fini(usb_polling_t *polling)
polling 93 uspace/lib/usbdev/src/devpoll.c assert(polling);
polling 94 uspace/lib/usbdev/src/devpoll.c assert(!polling->running);
polling 105 uspace/lib/usbdev/src/devpoll.c usb_polling_t *polling = arg;
polling 107 uspace/lib/usbdev/src/devpoll.c fibril_mutex_lock(&polling->guard);
polling 108 uspace/lib/usbdev/src/devpoll.c polling->running = true;
polling 109 uspace/lib/usbdev/src/devpoll.c fibril_mutex_unlock(&polling->guard);
polling 111 uspace/lib/usbdev/src/devpoll.c usb_pipe_t *pipe = &polling->ep_mapping->pipe;
polling 113 uspace/lib/usbdev/src/devpoll.c if (polling->debug > 0) {
polling 115 uspace/lib/usbdev/src/devpoll.c polling->ep_mapping;
polling 118 uspace/lib/usbdev/src/devpoll.c polling, usb_device_get_name(polling->device),
polling 123 uspace/lib/usbdev/src/devpoll.c polling->request_size, pipe->desc.max_transfer_size);
polling 127 uspace/lib/usbdev/src/devpoll.c while (failed_attempts <= polling->max_failures) {
polling 129 uspace/lib/usbdev/src/devpoll.c const errno_t rc = usb_pipe_read(pipe, polling->buffer,
polling 130 uspace/lib/usbdev/src/devpoll.c polling->request_size, &actual_size);
polling 133 uspace/lib/usbdev/src/devpoll.c if (polling->debug > 1) {
polling 136 uspace/lib/usbdev/src/devpoll.c polling,
polling 137 uspace/lib/usbdev/src/devpoll.c usb_debug_str_buffer(polling->buffer,
polling 144 uspace/lib/usbdev/src/devpoll.c polling, str_error(rc));
polling 148 uspace/lib/usbdev/src/devpoll.c if (rc == ESTALL && polling->auto_clear_halt) {
polling 154 uspace/lib/usbdev/src/devpoll.c usb_device_get_default_pipe(polling->device), pipe);
polling 159 uspace/lib/usbdev/src/devpoll.c const bool carry_on = !polling->on_error ? true :
polling 160 uspace/lib/usbdev/src/devpoll.c polling->on_error(polling->device, rc, polling->arg);
polling 162 uspace/lib/usbdev/src/devpoll.c if (!carry_on || polling->joining) {
polling 171 uspace/lib/usbdev/src/devpoll.c assert(polling->on_data);
polling 172 uspace/lib/usbdev/src/devpoll.c const bool carry_on = polling->on_data(polling->device,
polling 173 uspace/lib/usbdev/src/devpoll.c polling->buffer, actual_size, polling->arg);
polling 189 uspace/lib/usbdev/src/devpoll.c fibril_usleep(polling->delay);
polling 194 uspace/lib/usbdev/src/devpoll.c if (polling->on_polling_end)
polling 195 uspace/lib/usbdev/src/devpoll.c polling->on_polling_end(polling->device, failed, polling->arg);
polling 197 uspace/lib/usbdev/src/devpoll.c if (polling->debug > 0) {
polling 201 uspace/lib/usbdev/src/devpoll.c usb_device_get_name(polling->device));
polling 205 uspace/lib/usbdev/src/devpoll.c usb_device_get_name(polling->device));
polling 209 uspace/lib/usbdev/src/devpoll.c fibril_mutex_lock(&polling->guard);
polling 210 uspace/lib/usbdev/src/devpoll.c polling->running = false;
polling 211 uspace/lib/usbdev/src/devpoll.c fibril_mutex_unlock(&polling->guard);
polling 214 uspace/lib/usbdev/src/devpoll.c fibril_condvar_broadcast(&polling->cv);
polling 231 uspace/lib/usbdev/src/devpoll.c errno_t usb_polling_start(usb_polling_t *polling)
polling 233 uspace/lib/usbdev/src/devpoll.c if (!polling || !polling->device || !polling->ep_mapping || !polling->on_data)
polling 236 uspace/lib/usbdev/src/devpoll.c if (!polling->request_size)
polling 239 uspace/lib/usbdev/src/devpoll.c if (!polling->ep_mapping || (polling->ep_mapping->pipe.desc.transfer_type != USB_TRANSFER_INTERRUPT) ||
polling 240 uspace/lib/usbdev/src/devpoll.c (polling->ep_mapping->pipe.desc.direction != USB_DIRECTION_IN))
polling 244 uspace/lib/usbdev/src/devpoll.c if (polling->delay < 0)
polling 245 uspace/lib/usbdev/src/devpoll.c polling->delay = polling->ep_mapping->descriptor->poll_interval;
polling 247 uspace/lib/usbdev/src/devpoll.c polling->fibril = fibril_create(polling_fibril, polling);
polling 248 uspace/lib/usbdev/src/devpoll.c if (!polling->fibril)
polling 251 uspace/lib/usbdev/src/devpoll.c fibril_add_ready(polling->fibril);
polling 270 uspace/lib/usbdev/src/devpoll.c errno_t usb_polling_join(usb_polling_t *polling)
polling 273 uspace/lib/usbdev/src/devpoll.c if (!polling)
polling 277 uspace/lib/usbdev/src/devpoll.c if (!polling->running)
polling 281 uspace/lib/usbdev/src/devpoll.c polling->joining = true;
polling 284 uspace/lib/usbdev/src/devpoll.c rc = usb_device_unmap_ep(polling->ep_mapping);
polling 289 uspace/lib/usbdev/src/devpoll.c fibril_mutex_lock(&polling->guard);
polling 290 uspace/lib/usbdev/src/devpoll.c while (polling->running)
polling 291 uspace/lib/usbdev/src/devpoll.c fibril_condvar_wait(&polling->cv, &polling->guard);
polling 292 uspace/lib/usbdev/src/devpoll.c fibril_mutex_unlock(&polling->guard);
HelenOS homepage, sources at GitHub