int charqueue_dequeue(struct charqueue *charqueue) { int rc; spin_lock(&charqueue->lock); rc = charqueue_dequeue_1(charqueue); spin_unlock(&charqueue->lock); return rc; }
int charqueue_dequeue(CHARQUEUE *charqueue) { int rc; spin_lock(&charqueue->lock); rc = charqueue_dequeue_1(charqueue); spin_unlock(&charqueue->lock); return rc; }
int visor_charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n) { int rc, counter = 0, c; spin_lock(&charqueue->lock); for (;;) { if (n <= 0) break; /* no more buffer space */ c = charqueue_dequeue_1(charqueue); if (c < 0) break; /* no more input */ *buf = (unsigned char)(c); buf++; n--; counter++; } rc = counter; spin_unlock(&charqueue->lock); return rc; }