Changeset 9097c16a in mainline for uspace/drv/usbhub/main.c


Ignore:
Timestamp:
2011-02-04T13:14:14Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e7cdf8
Parents:
11797d5 (diff), ff244e6 (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:

Merged development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/main.c

    r11797d5 r9097c16a  
    2727 */
    2828
     29/** @addtogroup drvusbhub
     30 * @{
     31 */
     32
    2933#include <driver.h>
    3034#include <errno.h>
     
    3842
    3943usb_general_list_t usb_hub_list;
    40 futex_t usb_hub_list_lock;
     44fibril_mutex_t usb_hub_list_lock;
    4145
    4246static driver_ops_t hub_driver_ops = {
     
    6064int main(int argc, char *argv[])
    6165{
    62         usb_dprintf_enable(NAME,1);
    63         futex_initialize(&usb_hub_list_lock, 0);
     66        usb_dprintf_enable(NAME, 0);
     67       
     68        fibril_mutex_initialize(&usb_hub_list_lock);
     69        fibril_mutex_lock(&usb_hub_list_lock);
    6470        usb_lst_init(&usb_hub_list);
    65         futex_up(&usb_hub_list_lock);
     71        fibril_mutex_unlock(&usb_hub_list_lock);
     72
    6673        fid_t fid = fibril_create(usb_hub_control_loop, NULL);
    6774        if (fid == 0) {
    68                 dprintf(1, "failed to start fibril for HUB devices");
    69                 //printf("%s: failed to start fibril for HUB devices\n", NAME);
     75                fprintf(stderr, NAME ": failed to start monitoring fibril," \
     76                    " driver aborting.\n");
    7077                return ENOMEM;
    7178        }
     
    7481        return driver_main(&hub_driver);
    7582}
     83
     84/**
     85 * @}
     86 */
     87
Note: See TracChangeset for help on using the changeset viewer.