Changeset d48fcc0 in mainline for uspace/lib/usb/include/usb/pipes.h


Ignore:
Timestamp:
2011-04-09T09:45:14Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e9ce696
Parents:
a546687
Message:

Fine grain locking of USB pipes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/pipes.h

    ra546687 rd48fcc0  
    6060 * This endpoint must be bound with existing usb_device_connection_t
    6161 * (i.e. the wire to send data over).
     62 *
     63 * Locking order: if you want to lock both mutexes
     64 * (@c guard and @c hc_phone_mutex), lock @c guard first.
     65 * It is not necessary to lock @c guard if you want to lock @c hc_phone_mutex
     66 * only.
    6267 */
    6368typedef struct {
     69        /** Guard of the whole pipe. */
     70        fibril_mutex_t guard;
     71
    6472        /** The connection used for sending the data. */
    6573        usb_device_connection_t *wire;
     
    7987        /** Phone to the host controller.
    8088         * Negative when no session is active.
     89         * It is an error to access this member without @c hc_phone_mutex
     90         * being locked.
     91         * If call over the phone is to be made, it must be preceeded by
     92         * call to pipe_add_ref() [internal libusb function].
    8193         */
    8294        int hc_phone;
Note: See TracChangeset for help on using the changeset viewer.