Changeset 3b9f1fd in mainline for uspace/drv/usbhub/main.c


Ignore:
Timestamp:
2010-12-12T14:50:18Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
403bb26, 8e8289d, c9113d2
Parents:
1f3158c (diff), 16ecc28 (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:

merge from smekideki

File:
1 edited

Legend:

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

    r1f3158c r3b9f1fd  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 #include <usb/usbdrv.h>
     28
    2929#include <driver.h>
    3030#include <errno.h>
     31#include <async.h>
     32
     33#include <usb/usbdrv.h>
    3134#include "usbhub.h"
    3235#include "usbhub_private.h"
     
    4447};
    4548
     49int usb_hub_control_loop(void * noparam){
     50        while(true){
     51                usb_hub_check_hub_changes();
     52                async_usleep(10000);
     53        }
     54        return 0;
     55}
     56
     57
    4658int main(int argc, char *argv[])
    4759{
    4860        usb_lst_init(&usb_hub_list);
     61        fid_t fid = fibril_create(usb_hub_control_loop, NULL);
     62        if (fid == 0) {
     63                printf("%s: failed to start fibril for HUB devices\n", NAME);
     64                return ENOMEM;
     65        }
     66        fibril_add_ready(fid);
     67
    4968        return driver_main(&hub_driver);
    5069}
Note: See TracChangeset for help on using the changeset viewer.