diff options
author | Egor Bogatov <egorbo@gmail.com> | 2019-04-16 13:04:02 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-04-16 13:04:02 +0300 |
commit | 8cd9b562ea9d79459e1646ba2eb8936b99292511 (patch) | |
tree | 3c727384413fcc7d96053c2d71c0bfaee47d14a6 /mcs/class/referencesource | |
parent | d2054f6cc0021cbad644de2d94191574d1ad01c4 (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.cs | 6 |
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) { |