Changeset 85c47729 in mainline for uspace/lib/usb/include


Ignore:
Timestamp:
2011-04-08T13:25:58Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
61727bf
Parents:
8b74997f (diff), 4b39af4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Per endpoint communication mutex

Location:
uspace/lib/usb/include/usb/host
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/host/batch.h

    r8b74997f r85c47729  
    9292void usb_transfer_batch_call_in(usb_transfer_batch_t *instance);
    9393void usb_transfer_batch_call_out(usb_transfer_batch_t *instance);
    94 void usb_transfer_batch_finish(usb_transfer_batch_t *instance, int error);
     94void usb_transfer_batch_finish(usb_transfer_batch_t *instance);
     95
     96static inline void usb_transfer_batch_finish_error(
     97    usb_transfer_batch_t *instance, int error)
     98{
     99        assert(instance);
     100        instance->error = error;
     101        usb_transfer_batch_finish(instance);
     102}
    95103
    96104#endif
  • uspace/lib/usb/include/usb/host/device_keeper.h

    r8b74997f r85c47729  
    9696usb_speed_t usb_device_keeper_get_speed(usb_device_keeper_t *instance,
    9797    usb_address_t address);
    98 
    99 void usb_device_keeper_use_control(usb_device_keeper_t *instance,
    100     usb_target_t target);
    101 
    102 void usb_device_keeper_release_control(usb_device_keeper_t *instance,
    103     usb_target_t target);
    104 
    10598#endif
    10699/**
  • uspace/lib/usb/include/usb/host/endpoint.h

    r8b74997f r85c47729  
    3939#include <bool.h>
    4040#include <adt/list.h>
     41#include <fibril_synch.h>
     42
    4143#include <usb/usb.h>
    4244
     
    4850        usb_speed_t speed;
    4951        size_t max_packet_size;
    50         bool active;
    5152        unsigned toggle:1;
     53        fibril_mutex_t guard;
     54        fibril_condvar_t avail;
     55        volatile bool active;
    5256        link_t same_device_eps;
    5357} endpoint_t;
     
    5862
    5963void endpoint_destroy(endpoint_t *instance);
     64
     65void endpoint_use(endpoint_t *instance);
     66
     67void endpoint_release(endpoint_t *instance);
    6068
    6169int endpoint_toggle_get(endpoint_t *instance);
Note: See TracChangeset for help on using the changeset viewer.