dahdi: Use a single wait_queue_t for dahdi channels.

Since we've now switched to wait_event_interruptible calls, we have a
condition that we can check when we're awoken.  This allows us to
combine the separate wait queues into a single queue.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerreicks <rmeyerreicks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9548 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Shaun Ruffell
2010-12-21 16:09:22 +00:00
parent 74fff81da4
commit 2765186d03
2 changed files with 34 additions and 69 deletions

View File

@@ -451,26 +451,23 @@ struct dahdi_chan {
int sigcap; /*!< Capability for signalling */
__u32 chan_alarms; /*!< alarms status */
wait_queue_head_t waitq;
/* Used only by DAHDI -- NO DRIVER SERVICEABLE PARTS BELOW */
/* Buffer declarations */
u_char *readbuf[DAHDI_MAX_NUM_BUFS]; /*!< read buffer */
int inreadbuf;
int outreadbuf;
wait_queue_head_t readbufq; /*!< read wait queue */
u_char *writebuf[DAHDI_MAX_NUM_BUFS]; /*!< write buffers */
int inwritebuf;
int outwritebuf;
wait_queue_head_t writebufq; /*!< write wait queue */
int blocksize; /*!< Block size */
int eventinidx; /*!< out index in event buf (circular) */
int eventoutidx; /*!< in index in event buf (circular) */
unsigned int eventbuf[DAHDI_MAX_EVENTSIZE]; /*!< event circ. buffer */
wait_queue_head_t eventbufq; /*!< event wait queue */
wait_queue_head_t txstateq; /*!< waiting on the tx state to change */
int readn[DAHDI_MAX_NUM_BUFS]; /*!< # of bytes ready in read buf */
int readidx[DAHDI_MAX_NUM_BUFS]; /*!< current read pointer */
@@ -507,7 +504,6 @@ struct dahdi_chan {
/* I/O Mask */
unsigned int iomask; /*! I/O Mux signal mask */
wait_queue_head_t sel; /*! thingy for select stuff */
/* HDLC state machines */
struct fasthdlc_state txhdlc;