Deleted Added
full compact
subr_sbuf.c (212183) subr_sbuf.c (212184)
1/*-
2 * Copyright (c) 2000-2008 Poul-Henning Kamp
3 * Copyright (c) 2000-2008 Dag-Erling Co��dan Sm��rgrav
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 13 unchanged lines hidden (view full) ---

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000-2008 Poul-Henning Kamp
3 * Copyright (c) 2000-2008 Dag-Erling Co��dan Sm��rgrav
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 13 unchanged lines hidden (view full) ---

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/kern/subr_sbuf.c 212183 2010-09-03 17:42:12Z mdf $");
30__FBSDID("$FreeBSD: head/sys/kern/subr_sbuf.c 212184 2010-09-03 17:42:17Z mdf $");
31
32#include <sys/param.h>
33
34#ifdef _KERNEL
35#include <sys/ctype.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/systm.h>

--- 71 unchanged lines hidden (view full) ---

110
111#else /* _KERNEL && INVARIANTS */
112
113#define assert_sbuf_integrity(s) do { } while (0)
114#define assert_sbuf_state(s, i) do { } while (0)
115
116#endif /* _KERNEL && INVARIANTS */
117
31
32#include <sys/param.h>
33
34#ifdef _KERNEL
35#include <sys/ctype.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/systm.h>

--- 71 unchanged lines hidden (view full) ---

110
111#else /* _KERNEL && INVARIANTS */
112
113#define assert_sbuf_integrity(s) do { } while (0)
114#define assert_sbuf_state(s, i) do { } while (0)
115
116#endif /* _KERNEL && INVARIANTS */
117
118#ifdef _KERNEL
118#ifdef CTASSERT
119CTASSERT(powerof2(SBUF_MAXEXTENDSIZE));
120CTASSERT(powerof2(SBUF_MAXEXTENDINCR));
121#endif
122
123static int
124sbuf_extendsize(int size)
125{
126 int newsize;

--- 475 unchanged lines hidden ---
119CTASSERT(powerof2(SBUF_MAXEXTENDSIZE));
120CTASSERT(powerof2(SBUF_MAXEXTENDINCR));
121#endif
122
123static int
124sbuf_extendsize(int size)
125{
126 int newsize;

--- 475 unchanged lines hidden ---