summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2020-01-25 06:31:33 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2020-01-25 06:31:33 +0000
commit5975b1ffbe50ae4c56f5c0ee6712427de86e2817 (patch)
treee3b3605671555bf1e469ac50dad9ad09526fecbd /lib
parent2502c3116e524b7f132cace21c85e1b6fa2aeccb (diff)
tweaks sleeping for an mbuf so it's more mpsafe.
the stack puts an mbuf on the tun ifq, and ifqs protect themselves with a mutex. rather than invent another lock that tun can wrap these ifq ops with and also coordinate it's conditionals (reading and dying) with, try and reuse the ifq mtx for the tun stuff too. because ifqs are more special than tun, this adds a special ifq_deq_sleep to ifq code that tun can call. tun just passes the reading and dying variables to ifq to check, but the tricky stuff about ifqs are kept in the right place. with this, tun_dev_read should be callable without the kernel lock.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions