summaryrefslogtreecommitdiff
path: root/sys/src/cmd/nusb/serial/serial.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-07-05 08:17:37 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-07-05 08:17:37 +0200
commit8677db333a11de80971df3e60f787b72b45a568c (patch)
tree521566837bf0eac9dd4b56fe1eb9423e8caa5b9f /sys/src/cmd/nusb/serial/serial.h
parent502247bf92f380a642b8e17048466c18bb9efd24 (diff)
nusb/serial: implement flushes
handle reads and writes with 9pqueue(2) so they can be flushed and wont hang the filesystem. this also lets us get rid of the timeouts. ftdi is still full of braindamage that should be rewritten, but i dont have a device to test.
Diffstat (limited to 'sys/src/cmd/nusb/serial/serial.h')
-rw-r--r--sys/src/cmd/nusb/serial/serial.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/src/cmd/nusb/serial/serial.h b/sys/src/cmd/nusb/serial/serial.h
index 4117e7e95..eb46996f5 100644
--- a/sys/src/cmd/nusb/serial/serial.h
+++ b/sys/src/cmd/nusb/serial/serial.h
@@ -65,11 +65,9 @@ struct Serialport {
Channel *readc; /* to uncouple reads, only used in ftdi... */
int ndata;
uchar data[DataBufSz];
-
- QLock readq;
- Req *readfirst, *readlast; /* read request queue */
- int readpid;
- Rendez readrend;
+
+ Reqqueue *rq;
+ Reqqueue *wq;
};
struct Serial {