Commit in reactos/lib/kernel32/file on MAIN
pipe.c+4-31.10 -> 1.11
atomically increment the pipe id to be thread-safe. Thanks to Mark Grosberg for reporting it.

reactos/lib/kernel32/file
pipe.c 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- pipe.c	23 Jan 2004 21:16:03 -0000	1.10
+++ pipe.c	8 Oct 2004 21:48:46 -0000	1.11
@@ -1,4 +1,4 @@
-/* $Id: pipe.c,v 1.10 2004/01/23 21:16:03 ekohl Exp $
+/* $Id: pipe.c,v 1.11 2004/10/08 21:48:46 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -37,15 +37,16 @@
    NTSTATUS Status;
    HANDLE ReadPipeHandle;
    HANDLE WritePipeHandle;
+   ULONG PipeId;
    PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
 
    DefaultTimeout.QuadPart = 300000000; /* 30 seconds */
 
-   ProcessPipeId++;
+   PipeId = (ULONG)InterlockedIncrement((LONG*)&ProcessPipeId);
    swprintf(Buffer,
 	    L"\\Device\\NamedPipe\\Win32Pipes.%08x.%08x",
 	    NtCurrentTeb()->Cid.UniqueProcess,
-	    ProcessPipeId);
+	    PipeId);
    RtlInitUnicodeString (&PipeName,
 			 Buffer);
 
CVSspam 0.2.8