version 1.1, 1995/10/18 08:46:14 |
version 1.2, 1996/03/27 19:33:05 |
|
|
|
/* $OpenBSD$ */ |
|
/* $NetBSD: ring.c,v 1.7 1996/02/28 21:04:07 thorpej Exp $ */ |
|
|
/* |
/* |
* Copyright (c) 1988, 1993 |
* Copyright (c) 1988, 1993 |
* The Regents of the University of California. All rights reserved. |
* The Regents of the University of California. All rights reserved. |
|
|
*/ |
*/ |
|
|
#ifndef lint |
#ifndef lint |
/* from: static char sccsid[] = "@(#)ring.c 8.1 (Berkeley) 6/6/93"; */ |
#if 0 |
static char *rcsid = "$Id$"; |
static char sccsid[] = "@(#)ring.c 8.2 (Berkeley) 5/30/95"; |
|
static char rcsid[] = "$NetBSD: ring.c,v 1.7 1996/02/28 21:04:07 thorpej Exp $"; |
|
#else |
|
static char rcsid[] = "$OpenBSD$"; |
|
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
/* |
/* |
|
|
|
|
while (count) { |
while (count) { |
i = MIN(count, ring_empty_consecutive(ring)); |
i = MIN(count, ring_empty_consecutive(ring)); |
memcpy(ring->supply, buffer, i); |
memmove(ring->supply, buffer, i); |
ring_supplied(ring, i); |
ring_supplied(ring, i); |
count -= i; |
count -= i; |
buffer += i; |
buffer += i; |
|
|
|
|
while (count) { |
while (count) { |
i = MIN(count, ring_full_consecutive(ring)); |
i = MIN(count, ring_full_consecutive(ring)); |
memcpy(buffer, ring->consume, i); |
memmove(buffer, ring->consume, i); |
ring_consumed(ring, i); |
ring_consumed(ring, i); |
count -= i; |
count -= i; |
buffer += i; |
buffer += i; |