Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDick Porter <dick@acm.org>2004-07-14 22:37:27 +0400
committerDick Porter <dick@acm.org>2004-07-14 22:37:27 +0400
commitc80e116a5575753ae86129807513c74dac9ffcae (patch)
tree0a736cf989f2b9aa80e5c8fc896baf3664bffda7
parent6c82eac5aee3fbbe948c76dfe9e2119541e2fa67 (diff)
2004-07-14 Dick Porter <dick@ximian.com>
* wait.c (test_and_own): When not waiting for all handles to become signalled, only own and return the lowest. All the documentation suggests that the old way was correct, but experimentation shows it actually works like this. Patch by S�bastien Robitaille (sebastien.robitaille@croesus.com), fixes bug 61511. svn path=/branches/mono-1-0/mono/; revision=31158
-rw-r--r--mono/io-layer/ChangeLog9
-rw-r--r--mono/io-layer/wait.c12
2 files changed, 18 insertions, 3 deletions
diff --git a/mono/io-layer/ChangeLog b/mono/io-layer/ChangeLog
index 42fde43fdc9..ef6a7453600 100644
--- a/mono/io-layer/ChangeLog
+++ b/mono/io-layer/ChangeLog
@@ -1,3 +1,12 @@
+2004-07-14 Dick Porter <dick@ximian.com>
+
+ * wait.c (test_and_own): When not waiting for all handles to
+ become signalled, only own and return the lowest. All the
+ documentation suggests that the old way was correct, but
+ experimentation shows it actually works like this. Patch by
+ Sébastien Robitaille
+ (sebastien.robitaille@croesus.com), fixes bug 61511.
+
2004-07-08 Dick Porter <dick@ximian.com>
* io.c (file_seek): If there is a high 32bit offset part, make
diff --git a/mono/io-layer/wait.c b/mono/io-layer/wait.c
index e3d07b3a255..a236d17ed3e 100644
--- a/mono/io-layer/wait.c
+++ b/mono/io-layer/wait.c
@@ -354,9 +354,15 @@ static gboolean test_and_own (guint32 numobjects, gpointer *handles,
done = _wapi_handle_count_signalled_handles (numobjects, handles,
waitall, count, lowest);
if (done == TRUE) {
- for (i = 0; i < numobjects; i++) {
- if (_wapi_handle_issignalled (handles[i])) {
- _wapi_handle_ops_own (handles[i]);
+ if (waitall == TRUE) {
+ for (i = 0; i < numobjects; i++) {
+ if (_wapi_handle_issignalled (handles[i])) {
+ _wapi_handle_ops_own (handles[i]);
+ }
+ }
+ } else {
+ if (_wapi_handle_issignalled (handles[*lowest])) {
+ _wapi_handle_ops_own (handles[*lowest]);
}
}
}