diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2006-07-19 18:26:09 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2006-07-19 18:26:09 +0000 |
| commit | a02f5c6204e79d0a717f20b6076be78de39617ee (patch) | |
| tree | d7dacebb4a85fa8bfcbad7b4d513ea0e3b750aa9 /sys/dev/streams/streams.c | |
| parent | 93a73e5a00fdf2ef1baa8da0c9926403758f5dbb (diff) | |
Notes
Diffstat (limited to 'sys/dev/streams/streams.c')
| -rw-r--r-- | sys/dev/streams/streams.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index e303be4b6318..98a600bf76bb 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -70,9 +70,6 @@ static d_open_t streamsopen; struct svr4_sockcache_head svr4_head; -/* Initialization flag (set/queried by svr4_mod LKM) */ -int svr4_str_initialized = 0; - /* * Device minor numbers */ @@ -122,7 +119,7 @@ streams_modevent(module_t mod, int type, void *unused) { switch (type) { case MOD_LOAD: - /* XXX should make sure it isn't already loaded first */ + TAILQ_INIT(&svr4_head); dt_ptm = make_dev(&streams_cdevsw, dev_ptm, 0, 0, 0666, "ptm"); dt_arp = make_dev(&streams_cdevsw, dev_arp, 0, 0, 0666, @@ -382,14 +379,6 @@ svr4_delete_socket(p, fp) struct svr4_sockcache_entry *e; void *cookie = ((struct socket *)fp->f_data)->so_emuldata; - while (svr4_str_initialized != 2) { - if (atomic_cmpset_acq_int(&svr4_str_initialized, 0, 1)) { - TAILQ_INIT(&svr4_head); - atomic_store_rel_int(&svr4_str_initialized, 2); - } - return; - } - TAILQ_FOREACH(e, &svr4_head, entries) if (e->p == p && e->cookie == cookie) { TAILQ_REMOVE(&svr4_head, e, entries); |
