nmdm.c (185106) | nmdm.c (193018) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. 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 --- 15 unchanged lines hidden (view full) --- 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. 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 --- 15 unchanged lines hidden (view full) --- 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/nmdm/nmdm.c 185106 2008-11-19 21:07:33Z ed $"); | 32__FBSDID("$FreeBSD: head/sys/dev/nmdm/nmdm.c 193018 2009-05-29 06:41:23Z ed $"); |
33 34/* 35 * Pseudo-nulmodem driver 36 * Mighty handy for use with serial console in Vmware 37 */ 38 39#include <sys/param.h> 40#include <sys/systm.h> --- 71 unchanged lines hidden (view full) --- 112 callout_init(&ns->ns_part1.np_callout, CALLOUT_MPSAFE); 113 114 ns->ns_part2.np_pair = ns; 115 ns->ns_part2.np_other = &ns->ns_part1; 116 TASK_INIT(&ns->ns_part2.np_task, 0, nmdm_task_tty, &ns->ns_part2); 117 callout_init(&ns->ns_part2.np_callout, CALLOUT_MPSAFE); 118 119 /* Create device nodes. */ | 33 34/* 35 * Pseudo-nulmodem driver 36 * Mighty handy for use with serial console in Vmware 37 */ 38 39#include <sys/param.h> 40#include <sys/systm.h> --- 71 unchanged lines hidden (view full) --- 112 callout_init(&ns->ns_part1.np_callout, CALLOUT_MPSAFE); 113 114 ns->ns_part2.np_pair = ns; 115 ns->ns_part2.np_other = &ns->ns_part1; 116 TASK_INIT(&ns->ns_part2.np_task, 0, nmdm_task_tty, &ns->ns_part2); 117 callout_init(&ns->ns_part2.np_callout, CALLOUT_MPSAFE); 118 119 /* Create device nodes. */ |
120 tp = ns->ns_part1.np_tty = tty_alloc(&nmdm_class, &ns->ns_part1, | 120 tp = ns->ns_part1.np_tty = tty_alloc_mutex(&nmdm_class, &ns->ns_part1, |
121 &ns->ns_mtx); 122 tty_makedev(tp, NULL, "nmdm%luA", unit); 123 | 121 &ns->ns_mtx); 122 tty_makedev(tp, NULL, "nmdm%luA", unit); 123 |
124 tp = ns->ns_part2.np_tty = tty_alloc(&nmdm_class, &ns->ns_part2, | 124 tp = ns->ns_part2.np_tty = tty_alloc_mutex(&nmdm_class, &ns->ns_part2, |
125 &ns->ns_mtx); 126 tty_makedev(tp, NULL, "nmdm%luB", unit); 127 128 return (ns); 129} 130 131static void 132nmdm_clone(void *arg, struct ucred *cred, char *name, int nameen, --- 240 unchanged lines hidden --- | 125 &ns->ns_mtx); 126 tty_makedev(tp, NULL, "nmdm%luB", unit); 127 128 return (ns); 129} 130 131static void 132nmdm_clone(void *arg, struct ucred *cred, char *name, int nameen, --- 240 unchanged lines hidden --- |