kern_conf.c (154266) | kern_conf.c (158684) |
---|---|
1/*- 2 * Copyright (c) 1999-2002 Poul-Henning Kamp 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 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999-2002 Poul-Henning Kamp 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 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/kern/kern_conf.c 154266 2006-01-12 19:15:14Z alfred $"); | 28__FBSDID("$FreeBSD: head/sys/kern/kern_conf.c 158684 2006-05-17 06:37:14Z phk $"); |
29 30#include <sys/param.h> 31#include <sys/kernel.h> 32#include <sys/systm.h> 33#include <sys/bio.h> 34#include <sys/lock.h> 35#include <sys/mutex.h> 36#include <sys/module.h> --- 619 unchanged lines hidden (view full) --- 656 if (dev->si_flags & SI_CLONELIST) { 657 LIST_REMOVE(dev, si_clone); 658 dev->si_flags &= ~SI_CLONELIST; 659 } 660 661 csw = dev->si_devsw; 662 dev->si_devsw = NULL; /* already NULL for SI_ALIAS */ 663 while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) { | 29 30#include <sys/param.h> 31#include <sys/kernel.h> 32#include <sys/systm.h> 33#include <sys/bio.h> 34#include <sys/lock.h> 35#include <sys/mutex.h> 36#include <sys/module.h> --- 619 unchanged lines hidden (view full) --- 656 if (dev->si_flags & SI_CLONELIST) { 657 LIST_REMOVE(dev, si_clone); 658 dev->si_flags &= ~SI_CLONELIST; 659 } 660 661 csw = dev->si_devsw; 662 dev->si_devsw = NULL; /* already NULL for SI_ALIAS */ 663 while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) { |
664 printf("Purging %lu threads from %s\n", 665 dev->si_threadcount, devtoname(dev)); | |
666 csw->d_purge(dev); 667 msleep(csw, &devmtx, PRIBIO, "devprg", hz/10); | 664 csw->d_purge(dev); 665 msleep(csw, &devmtx, PRIBIO, "devprg", hz/10); |
666 if (dev->si_threadcount) 667 printf("Still %lu threads in %s\n", 668 dev->si_threadcount, devtoname(dev)); |
|
668 } | 669 } |
669 if (csw != NULL && csw->d_purge != NULL) 670 printf("All threads purged from %s\n", devtoname(dev)); | |
671 672 dev->si_drv1 = 0; 673 dev->si_drv2 = 0; 674 bzero(&dev->__si_u, sizeof(dev->__si_u)); 675 676 if (!(dev->si_flags & SI_ALIAS)) { 677 /* Remove from cdevsw list */ 678 LIST_REMOVE(dev, si_list); --- 206 unchanged lines hidden --- | 670 671 dev->si_drv1 = 0; 672 dev->si_drv2 = 0; 673 bzero(&dev->__si_u, sizeof(dev->__si_u)); 674 675 if (!(dev->si_flags & SI_ALIAS)) { 676 /* Remove from cdevsw list */ 677 LIST_REMOVE(dev, si_list); --- 206 unchanged lines hidden --- |