Changeset 5097bed4 in mainline for uspace/drv/usbhub/usbhub_private.h


Ignore:
Timestamp:
2011-01-07T15:00:31Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
44bb20b
Parents:
43c3937
Message:

usb hub driver codelifting. added futex to guard hub list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/usbhub_private.h

    r43c3937 r5097bed4  
    4343#include <bool.h>
    4444#include <driver.h>
     45#include <futex.h>
     46
    4547#include <usb/usb.h>
    4648#include <usb/usbdrv.h>
     
    6668
    6769/**
    68  * @brief create hub structure instance
     70 * create hub structure instance
    6971 *
    7072 * Set the address and port count information most importantly.
     
    7981extern usb_general_list_t usb_hub_list;
    8082
     83/** lock for hub list*/
     84extern futex_t usb_hub_list_lock;
     85
    8186
    8287/**
    83  * @brief perform complete control read transaction
     88 * perform complete control read transaction
    8489 *
    8590 * manages all three steps of transaction: setup, read and finalize
     
    99104
    100105/**
    101  * @brief perform complete control write transaction
     106 * perform complete control write transaction
    102107 *
    103  * maanges all three steps of transaction: setup, write and finalize
     108 * manages all three steps of transaction: setup, write and finalize
    104109 * @param phone
    105110 * @param target
     
    114119    void * sent_buffer, size_t sent_size
    115120);
    116 
    117 
    118 /**
    119  * set the device request to be a set address request
    120  * @param request
    121  * @param addr
    122  * \TODO this will be obsolete see usb/dev_req.h
    123  */
    124 static inline void usb_hub_set_set_address_request(
    125 usb_device_request_setup_packet_t * request, uint16_t addr
    126 ){
    127         request->index = 0;
    128         request->request_type = 0;/// \TODO this is not very nice sollution, we ned constant
    129         request->request = USB_DEVREQ_SET_ADDRESS;
    130         request->value = addr;
    131         request->length = 0;
    132 }
    133121
    134122/**
Note: See TracChangeset for help on using the changeset viewer.