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

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

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

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

22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/kern/subr_sbuf.c 131869 2004-07-09 11:37:44Z des $");
30__FBSDID("$FreeBSD: head/sys/kern/subr_sbuf.c 141616 2005-02-10 12:02:37Z phk $");
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>

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

44#include <stdio.h>
45#include <stdlib.h>
46#include <string.h>
47#endif /* _KERNEL */
48
49#include <sys/sbuf.h>
50
51#ifdef _KERNEL
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>

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

44#include <stdio.h>
45#include <stdlib.h>
46#include <string.h>
47#endif /* _KERNEL */
48
49#include <sys/sbuf.h>
50
51#ifdef _KERNEL
52MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
52static MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
53#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK)
54#define SBFREE(buf) free(buf, M_SBUF)
55#else /* _KERNEL */
56#define KASSERT(e, m)
57#define SBMALLOC(size) malloc(size)
58#define SBFREE(buf) free(buf)
59#define min(x,y) MIN(x,y)
60#endif /* _KERNEL */

--- 516 unchanged lines hidden ---
53#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK)
54#define SBFREE(buf) free(buf, M_SBUF)
55#else /* _KERNEL */
56#define KASSERT(e, m)
57#define SBMALLOC(size) malloc(size)
58#define SBFREE(buf) free(buf)
59#define min(x,y) MIN(x,y)
60#endif /* _KERNEL */

--- 516 unchanged lines hidden ---