Mercurial > ecos
changeset 1054:c706e0d163d7
* 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.
| author | nickg |
|---|---|
| date | Sat, 14 Jun 2003 18:10:18 +0000 |
| parents | 657f409c5dfe |
| children | 999c4261716b |
| files | packages/io/serial/current/ChangeLog packages/io/serial/current/include/serial.h packages/io/serial/current/include/serialio.h packages/io/serial/current/src/common/serial.c |
| diffstat | 4 files changed, 22 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/serial/current/ChangeLog +++ b/packages/io/serial/current/ChangeLog @@ -1,3 +1,15 @@ +2003-06-09 Nick Garnett <nickg@balti.calivar.com> + + * 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 <gary@mlbassoc.com> * src/common/serial.c (serial_get_config): Restart receiver
--- a/packages/io/serial/current/include/serial.h +++ b/packages/io/serial/current/include/serial.h @@ -60,6 +60,7 @@ #include <cyg/infra/cyg_type.h> #include <cyg/io/io.h> #include <cyg/io/serialio.h> +#include <cyg/io/devtab.h> #include <cyg/hal/drv_api.h> #ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT
--- 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 <pkgconf/system.h> +#include <pkgconf/io_serial.h> #include <pkgconf/hal.h> #include <cyg/infra/cyg_type.h> #include <cyg/io/config_keys.h>
--- 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
