Changeset 3a1aa20 in mainline for uspace/drv/usbhub/main.c
- Timestamp:
- 2011-02-26T15:22:27Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ad4562c2
- Parents:
- 0475e13 (diff), b8622e2 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/main.c
r0475e13 r3a1aa20 34 34 #include <errno.h> 35 35 #include <async.h> 36 #include <stdio.h> 36 37 37 38 #include "usbhub.h" … … 51 52 }; 52 53 53 int usb_hub_control_loop(void * noparam){54 while(true){55 usb_hub_check_hub_changes();56 async_usleep(1000 * 1000 );/// \TODO proper number once57 }58 return 0;59 }60 61 62 54 int main(int argc, char *argv[]) 63 55 { 64 56 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 65 57 dprintf(USB_LOG_LEVEL_INFO, "starting hub driver"); 58 59 //this is probably not needed anymore 66 60 fibril_mutex_initialize(&usb_hub_list_lock); 67 61 fibril_mutex_lock(&usb_hub_list_lock); 68 62 usb_lst_init(&usb_hub_list); 69 63 fibril_mutex_unlock(&usb_hub_list_lock); 70 71 fid_t fid = fibril_create(usb_hub_control_loop, NULL); 72 if (fid == 0) { 73 fprintf(stderr, NAME ": failed to start monitoring fibril," \ 74 " driver aborting.\n"); 75 return ENOMEM; 76 } 77 fibril_add_ready(fid); 78 64 79 65 return ddf_driver_main(&hub_driver); 80 66 }
Note:
See TracChangeset
for help on using the changeset viewer.