kern_alq.c (103995) | kern_alq.c (109623) |
---|---|
1/* 2 * Copyright (c) 2002, Jeffrey Roberson <jeff@freebsd.org> 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 --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) 2002, Jeffrey Roberson <jeff@freebsd.org> 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 --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/kern/kern_alq.c 103995 2002-09-26 07:38:56Z jeff $ | 26 * $FreeBSD: head/sys/kern/kern_alq.c 109623 2003-01-21 08:56:16Z alfred $ |
27 * 28 */ 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/kthread.h> 34#include <sys/lock.h> --- 312 unchanged lines hidden (view full) --- 347 error = vn_open(&nd, &flags, 0); 348 if (error) 349 return (error); 350 351 NDFREE(&nd, NDF_ONLY_PNBUF); 352 /* We just unlock so we hold a reference */ 353 VOP_UNLOCK(nd.ni_vp, 0, td); 354 | 27 * 28 */ 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/kthread.h> 34#include <sys/lock.h> --- 312 unchanged lines hidden (view full) --- 347 error = vn_open(&nd, &flags, 0); 348 if (error) 349 return (error); 350 351 NDFREE(&nd, NDF_ONLY_PNBUF); 352 /* We just unlock so we hold a reference */ 353 VOP_UNLOCK(nd.ni_vp, 0, td); 354 |
355 alq = malloc(sizeof(*alq), M_ALD, M_WAITOK|M_ZERO); 356 alq->aq_entbuf = malloc(count * size, M_ALD, M_WAITOK|M_ZERO); 357 alq->aq_first = malloc(sizeof(*ale) * count, M_ALD, M_WAITOK|M_ZERO); | 355 alq = malloc(sizeof(*alq), M_ALD, M_ZERO); 356 alq->aq_entbuf = malloc(count * size, M_ALD, M_ZERO); 357 alq->aq_first = malloc(sizeof(*ale) * count, M_ALD, M_ZERO); |
358 alq->aq_vp = nd.ni_vp; 359 alq->aq_cred = crhold(td->td_ucred); 360 alq->aq_entmax = count; 361 alq->aq_entlen = size; 362 alq->aq_entfree = alq->aq_first; 363 364 mtx_init(&alq->aq_mtx, "ALD Queue", NULL, MTX_SPIN|MTX_QUIET); 365 --- 138 unchanged lines hidden --- | 358 alq->aq_vp = nd.ni_vp; 359 alq->aq_cred = crhold(td->td_ucred); 360 alq->aq_entmax = count; 361 alq->aq_entlen = size; 362 alq->aq_entfree = alq->aq_first; 363 364 mtx_init(&alq->aq_mtx, "ALD Queue", NULL, MTX_SPIN|MTX_QUIET); 365 --- 138 unchanged lines hidden --- |