Changeset 91173333 in mainline for uspace/drv/hid/usbhid/usbhid.c
- Timestamp:
- 2018-01-13T21:36:13Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- edc51615
- Parents:
- 8a0c52a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/usbhid/usbhid.c
r8a0c52a r91173333 355 355 hid_dev->poll_pipe_mapping = NULL; 356 356 357 hid_dev->poll_stop = false;358 fibril_mutex_initialize(&hid_dev->poll_guard);359 fibril_condvar_initialize(&hid_dev->poll_cv);360 361 357 int rc = usb_hid_check_pipes(hid_dev, dev); 362 358 if (rc != EOK) { … … 506 502 507 503 /* Continue polling until the device is about to be removed. */ 508 return hid_dev->running && !hid_dev->poll_stop;504 return hid_dev->running; 509 505 } 510 506 … … 524 520 525 521 hid_dev->running = false; 526 527 /* Signal polling end to joining thread. */528 fibril_mutex_lock(&hid_dev->poll_guard);529 fibril_condvar_signal(&hid_dev->poll_cv);530 fibril_mutex_unlock(&hid_dev->poll_guard);531 522 } 532 523 … … 539 530 { 540 531 return hid_dev->report_nr; 541 }542 543 void usb_hid_prepare_deinit(usb_hid_dev_t *hid_dev)544 {545 assert(hid_dev);546 hid_dev->poll_stop = true;547 532 } 548 533
Note:
See TracChangeset
for help on using the changeset viewer.