This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Patch for io//serial/current/src/common/serial.c
- To: ecos-discuss at sources dot redhat dot com
- Subject: [ECOS] Patch for io//serial/current/src/common/serial.c
- From: "Dave Airlie" <airlied at parthus dot com>
- Date: 20 Oct 2000 17:25:24 +0100
When compiling without asserts but with block transfers enabled this patch
is required,
It is against the latest ftp snapshot 20 Oct... I'd say CVS hasn't changed
much since..
Dave.
--
David Airlie, Software Engineer, Parthus Technologies plc.,
Mary Rosse Centre, National Tech Park, Limerick, Ireland.
t: +353-61-508116 / f: +353-61-508101 / David.Airlie@parthus.com
--- serial.c.orig Fri Oct 20 15:36:34 2000
+++ serial.c Fri Oct 20 15:39:22 2000
@@ -807,10 +807,12 @@
unsigned char c;
int space;
+#ifdef CYGDBG_USE_ASSERTS
#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
CYG_ASSERT(false == cbuf->block_mode_xfer_running,
"Attempting char xmt while block transfer is running");
#endif
+#endif
#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
// if we are required to send an XON/XOFF char, send it before
// anything else
@@ -876,10 +878,12 @@
{
cbuf_t *cbuf = &chan->in_cbuf;
+#ifdef CYGDBG_USE_ASSERTS
#if CYGINT_IO_SERIAL_BLOCK_TRANSFER
CYG_ASSERT(false == cbuf->block_mode_xfer_running,
"Attempting char rcv while block transfer is running");
#endif
+#endif
#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE
// for software flow control, if the driver returns one of the characters
// we act on it and then drop it (the app must not see it)
@@ -992,8 +996,10 @@
return CYG_RCV_DISABLED;
#endif
+#ifdef CYGDBG_USE_ASSERTS
CYG_ASSERT(false == cbuf->block_mode_xfer_running,
"Attempting new block transfer while another is running");
+#endif
// Check for space
gap = cbuf->nb;
if (gap == cbuf->len)
@@ -1086,9 +1092,10 @@
return CYG_XMT_DISABLED;
#endif
+#ifdef CYGDBG_USE_ASSERTS
CYG_ASSERT(false == cbuf->block_mode_xfer_running,
"Attempting new block transfer while another is running");
-
+#endif
// Available data (G = get, P = put, x = data, . = empty)
// 0: no data
// negative: xxxxP.....Gxxx [offer last chunk only]