OLD | NEW |
1 /* Serial interface for local (hardwired) serial ports on Windows systems | 1 /* Serial interface for local (hardwired) serial ports on Windows systems |
2 | 2 |
3 Copyright (C) 2006-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2006-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 ExitThread (0); | 421 ExitThread (0); |
422 | 422 |
423 /* We are now in the started state. */ | 423 /* We are now in the started state. */ |
424 SetEvent (state->have_started); | 424 SetEvent (state->have_started); |
425 } | 425 } |
426 | 426 |
427 typedef DWORD WINAPI (*thread_fn_type)(void *); | 427 typedef DWORD WINAPI (*thread_fn_type)(void *); |
428 | 428 |
429 /* Create a new select thread for SCB executing THREAD_FN. The STATE | 429 /* Create a new select thread for SCB executing THREAD_FN. The STATE |
430 will be filled in by this function before return. */ | 430 will be filled in by this function before return. */ |
431 void | 431 static void |
432 create_select_thread (thread_fn_type thread_fn, | 432 create_select_thread (thread_fn_type thread_fn, |
433 struct serial *scb, | 433 struct serial *scb, |
434 struct ser_console_state *state) | 434 struct ser_console_state *state) |
435 { | 435 { |
436 DWORD threadId; | 436 DWORD threadId; |
437 | 437 |
438 /* Create all of the events. These are all auto-reset events. */ | 438 /* Create all of the events. These are all auto-reset events. */ |
439 state->read_event = CreateEvent (NULL, FALSE, FALSE, NULL); | 439 state->read_event = CreateEvent (NULL, FALSE, FALSE, NULL); |
440 state->except_event = CreateEvent (NULL, FALSE, FALSE, NULL); | 440 state->except_event = CreateEvent (NULL, FALSE, FALSE, NULL); |
441 state->have_started = CreateEvent (NULL, FALSE, FALSE, NULL); | 441 state->have_started = CreateEvent (NULL, FALSE, FALSE, NULL); |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 ops->setbaudrate = ser_base_setbaudrate; | 1340 ops->setbaudrate = ser_base_setbaudrate; |
1341 ops->setstopbits = ser_base_setstopbits; | 1341 ops->setstopbits = ser_base_setstopbits; |
1342 ops->drain_output = ser_base_drain_output; | 1342 ops->drain_output = ser_base_drain_output; |
1343 ops->async = ser_base_async; | 1343 ops->async = ser_base_async; |
1344 ops->read_prim = net_read_prim; | 1344 ops->read_prim = net_read_prim; |
1345 ops->write_prim = net_write_prim; | 1345 ops->write_prim = net_write_prim; |
1346 ops->wait_handle = net_windows_wait_handle; | 1346 ops->wait_handle = net_windows_wait_handle; |
1347 ops->done_wait_handle = net_windows_done_wait_handle; | 1347 ops->done_wait_handle = net_windows_done_wait_handle; |
1348 serial_add_interface (ops); | 1348 serial_add_interface (ops); |
1349 } | 1349 } |
OLD | NEW |