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:
authorEgor Bogatov <egorbo@gmail.com>2019-04-16 13:04:02 +0300
committerMarek Safar <marek.safar@gmail.com>2019-04-16 13:04:02 +0300
commit8cd9b562ea9d79459e1646ba2eb8936b99292511 (patch)
tree3c727384413fcc7d96053c2d71c0bfaee47d14a6 /mcs/class/referencesource
parentd2054f6cc0021cbad644de2d94191574d1ad01c4 (diff)
[netcore] Fix WaitHandle.SignalAndWait (#13809)
* fix failing tests * Add build-corefx-test-for- rule * Update WaitHandle.cs * fix S.T.T.rsp file * fix build * bump corlib version * handle new errors in old mono * Update w32handle.c
Diffstat (limited to 'mcs/class/referencesource')
-rw-r--r--mcs/class/referencesource/mscorlib/system/threading/waithandle.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/mcs/class/referencesource/mscorlib/system/threading/waithandle.cs b/mcs/class/referencesource/mscorlib/system/threading/waithandle.cs
index aef1a6a280a..146dd0c5e68 100644
--- a/mcs/class/referencesource/mscorlib/system/threading/waithandle.cs
+++ b/mcs/class/referencesource/mscorlib/system/threading/waithandle.cs
@@ -64,6 +64,7 @@ namespace System.Threading
private const int WAIT_ABANDONED = 0x80;
private const int WAIT_FAILED = 0x7FFFFFFF;
private const int ERROR_TOO_MANY_POSTS = 0x12A;
+ private const int ERROR_NOT_OWNED_BY_CALLER = 0x12B;
internal enum OpenExistingResult
{
@@ -622,6 +623,11 @@ namespace System.Threading
throw new InvalidOperationException(Environment.GetResourceString("Threading.WaitHandleTooManyPosts"));
}
+ if(ERROR_NOT_OWNED_BY_CALLER == ret)
+ {
+ throw new ApplicationException("Attempt to release mutex not owned by caller");
+ }
+
//Object was signaled
if(WAIT_OBJECT_0 == ret)
{