HomeFreeBSD

When setting up a socket in socreate(), there's no need to lock the

Description

When setting up a socket in socreate(), there's no need to lock the
socket lock around knlist_init(), so don't.

Hard code the setting of the socket reference count to 1 rather than
using soref() to avoid asserting the socket lock, since we've not yet
exposed the socket to other threads.

This removes two mutex operations from each socket allocation.

Details

Provenance
rwatsonAuthored on Mar 11 2005, 4:30 PM
Parents
rG5fab68b19eb9: Remove suggestive sx_init() comment in soalloc(). We will have something
Branches
Unknown
Tags
Unknown

Event Timeline