Changeset 4e44f5d in mainline


Ignore:
Timestamp:
2018-01-16T23:52:18Z (6 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3f44312
Parents:
338729c
Message:

usbdev: protect against flag race

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devpoll.c

    r338729c r4e44f5d  
    107107        assert(arg);
    108108        usb_polling_t *polling = arg;
     109
     110        fibril_mutex_lock(&polling->guard);
    109111        polling->running = true;
     112        fibril_mutex_unlock(&polling->guard);
    110113
    111114        usb_pipe_t *pipe = &polling->ep_mapping->pipe;
     
    208211        }
    209212
     213        fibril_mutex_lock(&polling->guard);
    210214        polling->running = false;
     215        fibril_mutex_unlock(&polling->guard);
    211216
    212217        /* Notify joiners, if any. */
Note: See TracChangeset for help on using the changeset viewer.