Changeset 113093a in mainline for uspace/srv/hid/console/console.c
- Timestamp:
- 2011-09-24T21:39:41Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1924bd43, f9d8c3a
- Parents:
- b3bf143 (diff), 024fcc5 (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/srv/hid/console/console.c
rb3bf143 r113093a 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 … … 904 927 atomic_set(&consoles[i].refcnt, 0); 905 928 fibril_mutex_initialize(&consoles[i].mtx); 929 prodcons_initialize(&consoles[i].input_pc); 906 930 907 931 if (graphics_state == GRAPHICS_FULL) { … … 942 966 } 943 967 944 prodcons_initialize(&consoles[i].input_pc);945 968 cons_redraw_state(&consoles[i]); 946 969
Note:
See TracChangeset
for help on using the changeset viewer.