[runtime] Fix mono_sem_timedwait for the case where we get interrupted.
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 15 Jun 2015 21:25:20 +0000 (14:25 -0700)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 15 Jun 2015 22:10:23 +0000 (15:10 -0700)
commit14b6dcd51c1b05dde572a002a23b6070e57a333a
treef13b97e6cdae9171bf52c834de430f122fba2d54
parente9e5bd152bccadeb43b6f329cde938c0d32a04f8
[runtime] Fix mono_sem_timedwait for the case where we get interrupted.

On mach, semaphore_timedwait returns KERN_ABORTED instead of setting the errno variable. The timeout argument is relative so it needs to be updated. We don't need to update the timeout argument on other platforms since it has an absolute value.
mono/utils/mono-semaphore.c