From d094e348c5d1a3785289c69c5185bbaca1257de8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 11 Jun 2012 16:54:35 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4266 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chqueues.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'os/kernel/src') diff --git a/os/kernel/src/chqueues.c b/os/kernel/src/chqueues.c index adb5dd807..79bf409cb 100644 --- a/os/kernel/src/chqueues.c +++ b/os/kernel/src/chqueues.c @@ -83,16 +83,19 @@ static msg_t qwait(GenericQueue *qp, systime_t time) { * @param[in] size size of the queue buffer * @param[in] infy pointer to a callback function that is invoked when * data is read from the queue. The value can be @p NULL. + * @param[in] link application defined pointer * * @init */ -void chIQInit(InputQueue *iqp, uint8_t *bp, size_t size, qnotify_t infy) { +void chIQInit(InputQueue *iqp, uint8_t *bp, size_t size, qnotify_t infy, + void *link) { queue_init(&iqp->q_waiting); iqp->q_counter = 0; iqp->q_buffer = iqp->q_rdptr = iqp->q_wrptr = bp; iqp->q_top = bp + size; iqp->q_notify = infy; + iqp->q_link = link; } /** @@ -260,16 +263,19 @@ size_t chIQReadTimeout(InputQueue *iqp, uint8_t *bp, * @param[in] size size of the queue buffer * @param[in] onfy pointer to a callback function that is invoked when * data is written to the queue. The value can be @p NULL. + * @param[in] link application defined pointer * * @init */ -void chOQInit(OutputQueue *oqp, uint8_t *bp, size_t size, qnotify_t onfy) { +void chOQInit(OutputQueue *oqp, uint8_t *bp, size_t size, qnotify_t onfy, + void *link) { queue_init(&oqp->q_waiting); oqp->q_counter = size; oqp->q_buffer = oqp->q_rdptr = oqp->q_wrptr = bp; oqp->q_top = bp + size; oqp->q_notify = onfy; + oqp->q_link = link; } /** -- cgit v1.2.3