Changeset 024fcc5 in mainline for uspace/srv/hid/console/console.c
- Timestamp:
- 2011-09-24T21:21:34Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 113093a
- Parents:
- d03da17
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/console.c
rd03da17 r024fcc5 344 344 } 345 345 346 static console_t *cons_get_active_uspace(void) 347 { 348 fibril_mutex_lock(&switch_mtx); 349 350 console_t *active_uspace = active_console; 351 if (active_uspace == kernel_console) { 352 active_uspace = prev_console; 353 } 354 assert(active_uspace != kernel_console); 355 356 fibril_mutex_unlock(&switch_mtx); 357 358 return active_uspace; 359 } 360 346 361 static ssize_t limit(ssize_t val, ssize_t lo, ssize_t hi) 347 362 { … … 466 481 event->c = c; 467 482 468 prodcons_produce(&active_console->input_pc, &event->link); 483 /* Kernel console does not read events 484 * from us, so we will redirect them 485 * to the (last) active userspace console 486 * if necessary. 487 */ 488 console_t *target_console = cons_get_active_uspace(); 489 490 prodcons_produce(&target_console->input_pc, 491 &event->link); 469 492 } 470 493
Note:
See TracChangeset
for help on using the changeset viewer.