devfs_devs.c (111730) | devfs_devs.c (125855) |
---|---|
1#define DEBUG 1 | |
2/* 3 * Copyright (c) 2000 4 * Poul-Henning Kamp. 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: 9 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36 28 * | 1/* 2 * Copyright (c) 2000 3 * Poul-Henning Kamp. 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 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36 27 * |
29 * $FreeBSD: head/sys/fs/devfs/devfs_devs.c 111730 2003-03-02 13:35:30Z phk $ | 28 * $FreeBSD: head/sys/fs/devfs/devfs_devs.c 125855 2004-02-15 21:43:08Z phk $ |
30 */ 31 32#include "opt_devfs.h" 33#include "opt_mac.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/conf.h> --- 400 unchanged lines hidden (view full) --- 438 if (atomic_cmpset_ptr(devfs_itod(ino), dev, NULL)) { 439 atomic_add_int(&devfs_generation, 1); 440 atomic_add_int(&devfs_numino, -1); 441 i = devfs_nextino; 442 if (ino < i) 443 atomic_cmpset_int(&devfs_nextino, i, ino); 444 } 445} | 29 */ 30 31#include "opt_devfs.h" 32#include "opt_mac.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/conf.h> --- 400 unchanged lines hidden (view full) --- 437 if (atomic_cmpset_ptr(devfs_itod(ino), dev, NULL)) { 438 atomic_add_int(&devfs_generation, 1); 439 atomic_add_int(&devfs_numino, -1); 440 i = devfs_nextino; 441 if (ino < i) 442 atomic_cmpset_int(&devfs_nextino, i, ino); 443 } 444} |
446 447static void 448devfs_init(void *junk) 449{ 450 451 devfs_rules_init(); 452} 453 454SYSINIT(devfs, SI_SUB_DEVFS, SI_ORDER_FIRST, devfs_init, NULL); 455 | |