PSXSS: It seems the renamed csrterm did not get in the repository.
[reactos.git] / posix / apps / posixw32 / posixw32.h
diff --git a/posix/apps/posixw32/posixw32.h b/posix/apps/posixw32/posixw32.h
new file mode 100644 (file)
index 0000000..d3e1626
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef _CSRTERM_H
+#define _CSRTERM_H
+
+/* PSX session: CSR terminal emulator side */
+
+#define NAME_BUFFER_SIZE 64
+
+typedef struct _PSXSS_PORT
+{
+    UNICODE_STRING    Name;
+    WCHAR             NameBuffer [NAME_BUFFER_SIZE];
+    HANDLE            Handle;
+
+} PSXSS_PORT, * PPSXSS_PORT;
+
+typedef struct _CSRTERM_SESSION_PORT
+{
+    UNICODE_STRING  Name;
+    WCHAR           NameBuffer [NAME_BUFFER_SIZE];
+    HANDLE          Handle;
+    struct {
+        HANDLE  Handle;
+        DWORD   Id;
+    } Thread;
+
+} CSRTERM_SESSION_PORT;
+
+typedef struct _CSRTERM_SESSION_SECTION
+{
+    UNICODE_STRING  Name;
+    WCHAR           NameBuffer [NAME_BUFFER_SIZE];
+    HANDLE          Handle;
+    ULONG           Size;
+    PVOID           BaseAddress;
+    ULONG           ViewSize;
+
+} CSRTERM_SESSION_SECTION;
+
+typedef struct _CSRTERM_SESSION
+{
+    ULONG                    Identifier; /* PortID for ServerPort in PSXSS */
+    PSXSS_PORT               ServerPort; /* \POSIX+\SessionPort */
+    CSRTERM_SESSION_PORT     Port;       /* \POSIX+\Sessions\P<pid> */
+    CSRTERM_SESSION_SECTION  Section;    /* \POSIX+\Sessions\D<pid> */
+    CLIENT_ID                Client;
+    CRITICAL_SECTION         Lock;
+    BOOL                     SsLinkIsActive;
+
+} CSRTERM_SESSION, * PCSRTERM_SESSION;
+
+#define   LOCK_SESSION RtlEnterCriticalSection(& Session.Lock)
+#define UNLOCK_SESSION RtlLeaveCriticalSection(& Session.Lock)
+#endif /* ndef _CSRTERM_H */