git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8622 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
a10028c175
commit
5a1884c287
|
@ -143,7 +143,6 @@ uint8_t *ibqGetFullBufferI(input_buffers_queue_t *ibqp) {
|
||||||
|
|
||||||
if (ibqIsEmptyI(ibqp)) {
|
if (ibqIsEmptyI(ibqp)) {
|
||||||
ibqp->ptr = NULL;
|
ibqp->ptr = NULL;
|
||||||
ibqp->top = NULL;
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +170,9 @@ void ibqReleaseBufferI(io_buffers_queue_t *ibqp) {
|
||||||
ibqp->brdptr = ibqp->buffers;
|
ibqp->brdptr = ibqp->buffers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Marked as no more sequentially accessible.*/
|
||||||
|
ibqp->ptr = NULL;
|
||||||
|
|
||||||
/* Notifying the buffer release.*/
|
/* Notifying the buffer release.*/
|
||||||
if (ibqp->notify != NULL) {
|
if (ibqp->notify != NULL) {
|
||||||
ibqp->notify(ibqp);
|
ibqp->notify(ibqp);
|
||||||
|
@ -206,6 +208,7 @@ msg_t ibqGetTimeout(input_buffers_queue_t *ibqp, systime_t timeout) {
|
||||||
if (msg < MSG_OK) {
|
if (msg < MSG_OK) {
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
/* Tries to get the buffer, the fields ptr and top are setup inside.*/
|
||||||
(void) ibqGetFullBufferI(ibqp);
|
(void) ibqGetFullBufferI(ibqp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +220,6 @@ msg_t ibqGetTimeout(input_buffers_queue_t *ibqp, systime_t timeout) {
|
||||||
empty in the queue.*/
|
empty in the queue.*/
|
||||||
if (ibqp->ptr == ibqp->top) {
|
if (ibqp->ptr == ibqp->top) {
|
||||||
ibqReleaseBufferI(ibqp);
|
ibqReleaseBufferI(ibqp);
|
||||||
ibqp->ptr = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
|
|
Loading…
Reference in New Issue