Changeset 3842a955 in mainline for uspace/lib/drv/generic/driver.c
- Timestamp:
- 2011-06-19T15:59:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 26e7d6d
- Parents:
- 9724d7f (diff), 74464e8 (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/lib/drv/generic/driver.c
r9724d7f r3842a955 139 139 find_interrupt_context_by_id(interrupt_context_list_t *list, int id) 140 140 { 141 interrupt_context_t *ctx; 142 141 143 fibril_mutex_lock(&list->mutex); 142 144 143 link_t *link = list->contexts.next; 144 interrupt_context_t *ctx; 145 146 while (link != &list->contexts) { 145 list_foreach(list->contexts, link) { 147 146 ctx = list_get_instance(link, interrupt_context_t, link); 148 147 if (ctx->id == id) { … … 150 149 return ctx; 151 150 } 152 link = link->next;153 151 } 154 152 … … 160 158 find_interrupt_context(interrupt_context_list_t *list, ddf_dev_t *dev, int irq) 161 159 { 160 interrupt_context_t *ctx; 161 162 162 fibril_mutex_lock(&list->mutex); 163 163 164 link_t *link = list->contexts.next; 165 interrupt_context_t *ctx; 166 167 while (link != &list->contexts) { 164 list_foreach(list->contexts, link) { 168 165 ctx = list_get_instance(link, interrupt_context_t, link); 169 166 if (ctx->irq == irq && ctx->dev == dev) { … … 171 168 return ctx; 172 169 } 173 link = link->next;174 170 } 175 171 … … 231 227 } 232 228 233 static ddf_fun_t *driver_get_function(li nk_t *functions, devman_handle_t handle)229 static ddf_fun_t *driver_get_function(list_t *functions, devman_handle_t handle) 234 230 { 235 231 ddf_fun_t *fun = NULL; 236 232 237 233 fibril_mutex_lock(&functions_mutex); 238 link_t *link = functions->next; 239 240 while (link != functions) { 234 235 list_foreach(*functions, link) { 241 236 fun = list_get_instance(link, ddf_fun_t, link); 242 237 if (fun->handle == handle) { … … 244 239 return fun; 245 240 } 246 247 link = link->next;248 241 } 249 242
Note:
See TracChangeset
for help on using the changeset viewer.