Changes in kernel/generic/src/console/console.c [91db0280:593e023] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
r91db0280 r593e023 84 84 static outdev_t stdout_source; 85 85 86 static void stdin_signal(indev_t *, indev_signal_t); 87 86 88 static indev_operations_t stdin_ops = { 87 .poll = NULL 89 .poll = NULL, 90 .signal = stdin_signal 88 91 }; 89 92 90 93 static void stdout_write(outdev_t *, wchar_t); 91 94 static void stdout_redraw(outdev_t *); 95 static void stdout_scroll_up(outdev_t *); 96 static void stdout_scroll_down(outdev_t *); 92 97 93 98 static outdev_operations_t stdout_ops = { 94 99 .write = stdout_write, 95 .redraw = stdout_redraw 100 .redraw = stdout_redraw, 101 .scroll_up = stdout_scroll_up, 102 .scroll_down = stdout_scroll_down 96 103 }; 97 104 … … 113 120 } 114 121 122 static void stdin_signal(indev_t *indev, indev_signal_t signal) 123 { 124 switch (signal) { 125 case INDEV_SIGNAL_SCROLL_UP: 126 if (stdout != NULL) 127 stdout_scroll_up(stdout); 128 break; 129 case INDEV_SIGNAL_SCROLL_DOWN: 130 if (stdout != NULL) 131 stdout_scroll_down(stdout); 132 break; 133 } 134 } 135 115 136 void stdout_wire(outdev_t *outdev) 116 137 { … … 136 157 if ((sink) && (sink->op->redraw)) 137 158 sink->op->redraw(sink); 159 } 160 } 161 162 static void stdout_scroll_up(outdev_t *dev) 163 { 164 list_foreach(dev->list, link, outdev_t, sink) { 165 if ((sink) && (sink->op->scroll_up)) 166 sink->op->scroll_up(sink); 167 } 168 } 169 170 static void stdout_scroll_down(outdev_t *dev) 171 { 172 list_foreach(dev->list, link, outdev_t, sink) { 173 if ((sink) && (sink->op->scroll_down)) 174 sink->op->scroll_down(sink); 138 175 } 139 176 } … … 167 204 void grab_console(void) 168 205 { 206 event_notify_1(EVENT_KCONSOLE, false, true); 169 207 bool prev = console_override; 170 208 … … 184 222 { 185 223 console_override = false; 224 event_notify_1(EVENT_KCONSOLE, false, false); 186 225 } 187 226 188 227 /** Activate kernel console override */ 189 sysarg_t sys_debug_ activate_console(void)228 sysarg_t sys_debug_console(void) 190 229 { 191 230 #ifdef CONFIG_KCONSOLE … … 229 268 } 230 269 } 270 231 271 if (chr_encode(ch, buf, &offset, buflen - 1) == EOK) { 232 272 putchar(ch); … … 264 304 265 305 /** Flush characters that are stored in the output buffer 266 * 306 * 267 307 */ 268 308 void kio_flush(void) … … 294 334 295 335 /** Put a character into the output buffer. 296 * 336 * 297 337 * The caller is required to hold kio_lock 298 338 */
Note:
See TracChangeset
for help on using the changeset viewer.