summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 936d9a55c..f04413cfd 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -29,6 +29,7 @@ details. */
#include "winsup.h"
#include <limits.h>
+#include "path.h"
#include "cygerrno.h"
#include <assert.h>
#include <stdlib.h>
@@ -37,6 +38,9 @@ details. */
#include "perprocess.h"
#include "security.h"
#include "cygtls.h"
+#include "fhandler.h"
+#include "dtable.h"
+#include "cygheap.h"
#include <semaphore.h>
#include <stdio.h>
#include <sys/timeb.h>
@@ -2968,8 +2972,7 @@ semaphore::semaphore (unsigned long long shash, LUID sluid, int sfd,
{
char name[CYG_MAX_PATH];
- __small_sprintf (name, "%scyg_psem/cyg%016X%08x%08x",
- wincap.has_terminal_services () ? "Global\\" : "",
+ __small_sprintf (name, "%scyg_psem/cyg%016X%08x%08x", cygheap->shared_prefix,
hash, luid.HighPart, luid.LowPart);
this->win32_obj_id = ::CreateSemaphore (&sec_all, value, LONG_MAX, name);
if (!this->win32_obj_id)