Changeset ba5ab09 in mainline
- Timestamp:
- 2011-01-28T14:36:47Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 89beb08, aec2ad4
- Parents:
- 81c0854f
- Location:
- uspace/drv/usbhub
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/main.c
r81c0854f rba5ab09 42 42 43 43 usb_general_list_t usb_hub_list; 44 f utex_t usb_hub_list_lock;44 fibril_mutex_t usb_hub_list_lock; 45 45 46 46 static driver_ops_t hub_driver_ops = { … … 65 65 { 66 66 usb_dprintf_enable(NAME, 0); 67 68 futex_initialize(&usb_hub_list_lock, 0); 67 68 fibril_mutex_initialize(&usb_hub_list_lock); 69 fibril_mutex_lock(&usb_hub_list_lock); 69 70 usb_lst_init(&usb_hub_list); 70 f utex_up(&usb_hub_list_lock);71 fibril_mutex_unlock(&usb_hub_list_lock); 71 72 72 73 fid_t fid = fibril_create(usb_hub_control_loop, NULL); -
uspace/drv/usbhub/usbhub.c
r81c0854f rba5ab09 203 203 204 204 //add the hub to list 205 f utex_down(&usb_hub_list_lock);205 fibril_mutex_lock(&usb_hub_list_lock); 206 206 usb_lst_append(&usb_hub_list, hub_info); 207 f utex_up(&usb_hub_list_lock);207 fibril_mutex_unlock(&usb_hub_list_lock); 208 208 209 209 dprintf(1, "hub info added to list"); … … 445 445 */ 446 446 usb_general_list_t * lst_item; 447 f utex_down(&usb_hub_list_lock);447 fibril_mutex_lock(&usb_hub_list_lock); 448 448 for (lst_item = usb_hub_list.next; 449 449 lst_item != &usb_hub_list; 450 450 lst_item = lst_item->next) { 451 f utex_up(&usb_hub_list_lock);451 fibril_mutex_unlock(&usb_hub_list_lock); 452 452 usb_hub_info_t * hub_info = ((usb_hub_info_t*)lst_item->data); 453 453 /* … … 488 488 489 489 if (opResult != EOK) { 490 free(change_bitmap); 490 491 dprintf(1, "something went wrong while getting status of hub"); 491 492 continue; … … 503 504 504 505 ipc_hangup(hc); 505 f utex_down(&usb_hub_list_lock);506 } 507 f utex_up(&usb_hub_list_lock);506 fibril_mutex_lock(&usb_hub_list_lock); 507 } 508 fibril_mutex_unlock(&usb_hub_list_lock); 508 509 } 509 510 -
uspace/drv/usbhub/usbhub_private.h
r81c0854f rba5ab09 43 43 #include <bool.h> 44 44 #include <driver.h> 45 #include <f utex.h>45 #include <fibril_synch.h> 46 46 47 47 #include <usb/usb.h> … … 82 82 83 83 /** Lock for hub list*/ 84 extern f utex_t usb_hub_list_lock;84 extern fibril_mutex_t usb_hub_list_lock; 85 85 86 86
Note:
See TracChangeset
for help on using the changeset viewer.