summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-01-13 07:43:12 +0000
committerglebius <glebius@FreeBSD.org>2005-01-13 07:43:12 +0000
commit93aaafbe168e1ffcbe302959df6d2898d8e3d894 (patch)
tree9a41e73355bf81de3e39a213ab6c7eb188e7265c /sys/tools
parentc3e405fd2484498597f1e363ded0d3399967fbf4 (diff)
downloadFreeBSD-src-93aaafbe168e1ffcbe302959df6d2898d8e3d894.zip
FreeBSD-src-93aaafbe168e1ffcbe302959df6d2898d8e3d894.tar.gz
Locking and cleanup of tty netgraph node. Tty stack is Giant-locked,
so we need to acquire Giant in netgraph methods, so that we don't race with line discipline methods. Remove NET_NEEDS_GIANT. - Packets coming into node from netgraph are queued in ifqueue attached to node private data. - Mutex in struct ifqueue is used to lock not only the queue, but the whole private data, and tp->t_lsc field. - tp->t_lsc pointer is used to indicate whether line discipline is attached to netgraph or not. - Use FLG_DIE flag to indicate that node may be destroyed. (This protection doesn't work, and it didn't before. Must be redesigned.) - Increment ngt_unit atomically, removing mutex. - Acquire Giant, when executing ngt_start() from netgraph context. - Acquire Giant, when {,de}registering line discipline. - Uncomment forcing queue mode on peers hook, since this is reasonable. - Force queue mode on our hook, to avoid acquiring Giant when coming from network stack. We may already hold some mutexes at this point. Cleanups: - Use callout_pending() instead of our own flag. - Remove spl(9) calls. Now we can use return() instead of ERROUT(). style(9): - Sort includes. - Sparse initializer for struct linesw. - Remove some empty lines, sort declarations. Reviewed by: julian, phk MFC after: 1 month
Diffstat (limited to 'sys/tools')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud