subr_sbuf.c (104449) | subr_sbuf.c (109623) |
---|---|
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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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 * | 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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 * $FreeBSD: head/sys/kern/subr_sbuf.c 104449 2002-10-04 09:58:17Z phk $ | 28 * $FreeBSD: head/sys/kern/subr_sbuf.c 109623 2003-01-21 08:56:16Z alfred $ |
29 */ 30 31#include <sys/param.h> 32 33#ifdef _KERNEL 34#include <sys/ctype.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 7 unchanged lines hidden (view full) --- 44#include <stdlib.h> 45#include <string.h> 46#endif /* _KERNEL */ 47 48#include <sys/sbuf.h> 49 50#ifdef _KERNEL 51MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers"); | 29 */ 30 31#include <sys/param.h> 32 33#ifdef _KERNEL 34#include <sys/ctype.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 7 unchanged lines hidden (view full) --- 44#include <stdlib.h> 45#include <string.h> 46#endif /* _KERNEL */ 47 48#include <sys/sbuf.h> 49 50#ifdef _KERNEL 51MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers"); |
52#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK) | 52#define SBMALLOC(size) malloc(size, M_SBUF, 0) |
53#define SBFREE(buf) free(buf, M_SBUF) 54#else /* _KERNEL */ 55#define KASSERT(e, m) 56#define SBMALLOC(size) malloc(size) 57#define SBFREE(buf) free(buf) 58#define min(x,y) MIN(x,y) 59#endif /* _KERNEL */ 60 --- 510 unchanged lines hidden --- | 53#define SBFREE(buf) free(buf, M_SBUF) 54#else /* _KERNEL */ 55#define KASSERT(e, m) 56#define SBMALLOC(size) malloc(size) 57#define SBFREE(buf) free(buf) 58#define min(x,y) MIN(x,y) 59#endif /* _KERNEL */ 60 --- 510 unchanged lines hidden --- |