summaryrefslogtreecommitdiff
path: root/Userland/Services/LaunchServer
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-05-13 02:50:01 -0700
committerAndreas Kling <kling@serenityos.org>2021-05-14 11:32:50 +0200
commit4728f2af8064e76f499d2ae5a957afff6330eb30 (patch)
tree88c7f4bc07221031fdefb0657028960937b1963a /Userland/Services/LaunchServer
parent879eec6aa8e5abed7bddcf293ff9e584f8ae2c86 (diff)
downloadserenity-4728f2af8064e76f499d2ae5a957afff6330eb30.zip
Kernel: Avoid unnecessary time under lock in TCPSocket::create
Avoid holding the sockets_by_tuple lock while allocating the TCPSocket. While checking if the list contains the item we can also hold the lock in shared mode, as we are only reading the hash table. In addition the call to from_tuple appears to be superfluous, as we created the socket, so we should be able to just return it directly. This avoids the recursive lock acquisition, as well as the unnecessary hash table lookups.
Diffstat (limited to 'Userland/Services/LaunchServer')
0 files changed, 0 insertions, 0 deletions