summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2013-12-08 19:04:08 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2013-12-08 19:04:08 +0000
commit8f12c06d56716270f7e3b6ba30c35c24f04f1e3d (patch)
treed058561ae35e15e8efd1c7f493db4604cf980859 /lib
parent076a29674edcdf57a939eb723b6ceb533dbcaa40 (diff)
Reduce the random name length when sem_init is called with pshared
following what is recommended for mkstemp. This reduces the number of calls to sched_yield considerably. tedu@ ok.
Diffstat (limited to 'lib')
-rw-r--r--lib/librthread/rthread_sem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_sem.c b/lib/librthread/rthread_sem.c
index 20c7aecef29..c3738842cef 100644
--- a/lib/librthread/rthread_sem.c
+++ b/lib/librthread/rthread_sem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_sem.c,v 1.16 2013/11/26 11:24:43 fgsch Exp $ */
+/* $OpenBSD: rthread_sem.c,v 1.17 2013/12/08 19:04:07 fgsch Exp $ */
/*
* Copyright (c) 2004,2005,2013 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -40,7 +40,7 @@
#define SEM_PATH_SIZE (5 + SHA256_DIGEST_STRING_LENGTH + 4)
/* long enough to be hard to guess */
-#define SEM_RANDOM_NAME_LEN 160
+#define SEM_RANDOM_NAME_LEN 10
/*
* Size of memory to be mmap()'ed by named semaphores.