Win32OperatingSystem.st
changeset 5099 bb7e5db7b096
parent 5094 8fe5b7685308
child 5120 13143fbcbdf8
--- a/Win32OperatingSystem.st	Tue Dec 14 15:00:03 1999 +0100
+++ b/Win32OperatingSystem.st	Tue Dec 14 19:42:48 1999 +0100
@@ -5398,6 +5398,37 @@
     "
 !
 
+supportsSelectOnPipes
+    "return true, if the OS supports selecting on pipe
+     filedescriptors via select.
+     If false is returned, ProcessorScheduler will poll in 50ms
+     intervals for I/O becoming ready."
+
+    ^ false
+
+    "
+     OperatingSystem supportsSelectOnPipes 
+    "
+
+    "Modified: / 14.12.1999 / 19:41:03 / cg"
+    "Created: / 14.12.1999 / 19:43:13 / cg"
+!
+
+supportsSelectOnSockets
+    "return true, if the OS supports selecting on socket
+     filedescriptors via select.
+     If false is returned, ProcessorScheduler will poll in 50ms
+     intervals for I/O becoming ready."
+
+    ^ false
+
+    "
+     OperatingSystem supportsSelectOnSockets 
+    "
+
+    "Modified: / 14.12.1999 / 19:41:03 / cg"
+!
+
 supportsVolumes
     "return true, if the OS supports disk volumes.
      False is returned for UNIX, true for MSDOS and VMS"
@@ -6566,57 +6597,6 @@
     ^ self primitiveFailed
 !
 
-waitForSingleObject:fdOrHandle withTimeout:millis
-    "wait for an fd to become ready.
-     Timeout after t milliseconds or, if the timeout time is 0, immediately..
-     Zero time can be used to poll a file-
-     descriptors (i.e. to check if I/O possible without blocking).
-     Return the fd if I/O ok, nil if timed-out or interrupted."
-
-%{
-    INT t;
-    DWORD res;
-    HANDLE h = NULL;
-
-    if (__isExternalAddress(fdOrHandle)) {
-	h = _HANDLEVal(fdOrHandle);
-    } else {
-	if (__isSmallInteger(fdOrHandle)) {
-	    h = (HANDLE) _get_osfhandle (__intVal(fdOrHandle));
-	} else {
-	    goto fail;
-	}
-    }
-
-    if (__isSmallInteger(millis)) {
-	t = __intVal(millis);
-    } else {
-	t = INFINITE;
-    }
-
-#ifdef DO_WRAP_CALLS
-    do {    
-	res = __STX_API_CALL2( (void *)WaitForSingleObject, (void *)h,  (void *)t);
-    } while ((res < 0) && (errno == EINTR));
-#else
-    res = WaitForSingleObject(h, t);
-#endif
-    if (res == WAIT_FAILED) {
-	RETURN (nil);
-    }
-    if (res == WAIT_TIMEOUT) {
-	RETURN (nil);
-    }
-
-    RETURN (fdOrHandle);
-fail: ;
-%}.
-    "
-     invalid arg,
-    "
-    ^ self primitiveFailed
-!
-
 waitForMultipleObjects:fdOrHandleArray withTimeout:millis
     "wait for an fd to become ready.
      Timeout after t milliseconds or, if the timeout time is 0, immediately..
@@ -6691,6 +6671,57 @@
      invalid arg,
     "
     ^ self primitiveFailed
+!
+
+waitForSingleObject:fdOrHandle withTimeout:millis
+    "wait for an fd to become ready.
+     Timeout after t milliseconds or, if the timeout time is 0, immediately..
+     Zero time can be used to poll a file-
+     descriptors (i.e. to check if I/O possible without blocking).
+     Return the fd if I/O ok, nil if timed-out or interrupted."
+
+%{
+    INT t;
+    DWORD res;
+    HANDLE h = NULL;
+
+    if (__isExternalAddress(fdOrHandle)) {
+	h = _HANDLEVal(fdOrHandle);
+    } else {
+	if (__isSmallInteger(fdOrHandle)) {
+	    h = (HANDLE) _get_osfhandle (__intVal(fdOrHandle));
+	} else {
+	    goto fail;
+	}
+    }
+
+    if (__isSmallInteger(millis)) {
+	t = __intVal(millis);
+    } else {
+	t = INFINITE;
+    }
+
+#ifdef DO_WRAP_CALLS
+    do {    
+	res = __STX_API_CALL2( (void *)WaitForSingleObject, (void *)h,  (void *)t);
+    } while ((res < 0) && (errno == EINTR));
+#else
+    res = WaitForSingleObject(h, t);
+#endif
+    if (res == WAIT_FAILED) {
+	RETURN (nil);
+    }
+    if (res == WAIT_TIMEOUT) {
+	RETURN (nil);
+    }
+
+    RETURN (fdOrHandle);
+fail: ;
+%}.
+    "
+     invalid arg,
+    "
+    ^ self primitiveFailed
 ! !
 
 !Win32OperatingSystem::RegistryEntry class methodsFor:'defaults'!
@@ -7946,6 +7977,6 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.78 1999-12-13 10:39:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.79 1999-12-14 18:42:16 cg Exp $'
 ! !
 Win32OperatingSystem initialize!