summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket2.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2009-08-10 16:49:38 +0000
committerthib <thib@openbsd.org>2009-08-10 16:49:38 +0000
commit9ed051c75c2270aa42d6427a041f6f4e7abbd0d2 (patch)
tree8e60ca70f2fdec27d85261d270607bb0d79f31b6 /sys/kern/uipc_socket2.c
parentright now, we only increment ci_idepth in struct cpuinfo when (diff)
downloadwireguard-openbsd-9ed051c75c2270aa42d6427a041f6f4e7abbd0d2.tar.xz
wireguard-openbsd-9ed051c75c2270aa42d6427a041f6f4e7abbd0d2.zip
Don't use char arrays for sleep wchans and reuse them.
just use strings and make things unique. ok claudio@
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r--sys/kern/uipc_socket2.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index a6590c7afcc..bb53e2cc12d 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.48 2009/03/30 14:29:30 blambert Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.49 2009/08/10 16:49:39 thib Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -50,12 +50,6 @@
* Primitive routines for operating on sockets and socket buffers
*/
-/* strings for sleep message: */
-const char netcon[] = "netcon";
-const char netcls[] = "netcls";
-const char netio[] = "netio";
-const char netlck[] = "netlck";
-
u_long sb_max = SB_MAX; /* patchable */
extern struct pool mclpools[];
@@ -283,7 +277,7 @@ sbwait(struct sockbuf *sb)
sb->sb_flags |= SB_WAIT;
return (tsleep(&sb->sb_cc,
- (sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, netio,
+ (sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "netio",
sb->sb_timeo));
}
@@ -300,7 +294,7 @@ sb_lock(struct sockbuf *sb)
sb->sb_flags |= SB_WANT;
error = tsleep(&sb->sb_flags,
(sb->sb_flags & SB_NOINTR) ?
- PSOCK : PSOCK|PCATCH, netlck, 0);
+ PSOCK : PSOCK|PCATCH, "netlck", 0);
if (error)
return (error);
}