# HG changeset patch # User nickg # Date 1055614218 0 # Node ID c706e0d163d74343069d91ee7414043d23445b96 # Parent 657f409c5dfe5b171b42fe100e463cdeca4b0c17 * src/common/serial.c: Changed all calls to cyg_drv_cond_signal() to cyg_drv_cond_broadcast(). Removed comment asking whether this matters: it does. * include/serialio.h: Added includes of pkgconf files so that the ifdefs in this file work properly. * include/serial.h: Added include of devtab.h to fix compile error. diff --git a/packages/io/serial/current/ChangeLog b/packages/io/serial/current/ChangeLog --- a/packages/io/serial/current/ChangeLog +++ b/packages/io/serial/current/ChangeLog @@ -1,3 +1,15 @@ +2003-06-09 Nick Garnett + + * src/common/serial.c: Changed all calls to cyg_drv_cond_signal() + to cyg_drv_cond_broadcast(). Removed comment asking whether this + matters: it does. + + * include/serialio.h: Added includes of pkgconf files so that the + ifdefs in this file work properly. + + * include/serial.h: Added include of devtab.h to fix compile + error. + 2003-05-21 Gary Thomas * src/common/serial.c (serial_get_config): Restart receiver diff --git a/packages/io/serial/current/include/serial.h b/packages/io/serial/current/include/serial.h --- a/packages/io/serial/current/include/serial.h +++ b/packages/io/serial/current/include/serial.h @@ -60,6 +60,7 @@ #include #include #include +#include #include #ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT diff --git a/packages/io/serial/current/include/serialio.h b/packages/io/serial/current/include/serialio.h --- a/packages/io/serial/current/include/serialio.h +++ b/packages/io/serial/current/include/serialio.h @@ -54,6 +54,8 @@ // This file contains the user-level visible I/O interfaces +#include +#include #include #include #include diff --git a/packages/io/serial/current/src/common/serial.c b/packages/io/serial/current/src/common/serial.c --- a/packages/io/serial/current/src/common/serial.c +++ b/packages/io/serial/current/src/common/serial.c @@ -292,8 +292,6 @@ serial_init(serial_channel *chan) } // --------------------------------------------------------------------------- -// FIXME:@@@ Throughout this file there are uses of cyg_drv_cond_signal and -// cyg_drv_cond_broadcast. Does it matter which? -Jifl static Cyg_ErrNo serial_write(cyg_io_handle_t handle, const void *_buf, cyg_uint32 *len) @@ -613,7 +611,7 @@ serial_get_config(cyg_io_handle_t handle cyg_drv_dsr_lock(); if (in_cbuf->waiting) { in_cbuf->abort = true; - cyg_drv_cond_signal(&in_cbuf->wait); + cyg_drv_cond_broadcast(&in_cbuf->wait); in_cbuf->waiting = false; } in_cbuf->get = in_cbuf->put = in_cbuf->nb = 0; // Flush buffered input @@ -637,11 +635,11 @@ serial_get_config(cyg_io_handle_t handle // Caution - assumed to be called from 'timeout' (i.e. DSR) code if (in_cbuf->len != 0) { in_cbuf->abort = true; - cyg_drv_cond_signal(&in_cbuf->wait); + cyg_drv_cond_broadcast(&in_cbuf->wait); } if (out_cbuf->len != 0) { out_cbuf->abort = true; - cyg_drv_cond_signal(&out_cbuf->wait); + cyg_drv_cond_broadcast(&out_cbuf->wait); } break; @@ -660,7 +658,7 @@ serial_get_config(cyg_io_handle_t handle NULL, NULL); if (out_cbuf->waiting) { out_cbuf->abort = true; - cyg_drv_cond_signal(&out_cbuf->wait); + cyg_drv_cond_broadcast(&out_cbuf->wait); out_cbuf->waiting = false; } cyg_drv_dsr_unlock(); @@ -888,7 +886,7 @@ serial_xmt_char(serial_channel *chan) // before (e.g. because of flow control) if (cbuf->waiting) { cbuf->waiting = false; - cyg_drv_cond_signal(&cbuf->wait); + cyg_drv_cond_broadcast(&cbuf->wait); } #ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT cyg_selwakeup( &cbuf->selinfo ); @@ -962,7 +960,7 @@ serial_rcv_char(serial_channel *chan, un enable_diag_uart = _enable; #endif // CYGDBG_DIAG_BUF cbuf->waiting = false; - cyg_drv_cond_signal(&cbuf->wait); + cyg_drv_cond_broadcast(&cbuf->wait); } } @@ -1076,7 +1074,7 @@ serial_data_rcv_done(serial_channel *cha if (cbuf->waiting) { cbuf->waiting = false; - cyg_drv_cond_signal(&cbuf->wait); + cyg_drv_cond_broadcast(&cbuf->wait); } #ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL // If we've hit the high water mark, tell the other side to stop