harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Berezhniuk (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5106) [drlvm][thread] os_thread_yield_other() works incorrectly on Linux
Date Sun, 11 Nov 2007 00:05:50 GMT
[drlvm][thread] os_thread_yield_other() works incorrectly on Linux

                 Key: HARMONY-5106
                 URL: https://issues.apache.org/jira/browse/HARMONY-5106
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Linux
            Reporter: Ilya Berezhniuk

os_thread_yield_other() function on Linux uses sem_timedwait() to wait for response from SIGUSR2
It passes time interval =1ms to sem_timedwait(), but by documentation sem_timedwait() receives
not time interval, but absolute time since 1970, so now sem_timedwait() always returns ETIMEDOUT

It's required to calculate timeout exceed absolute time by adding needed interval to current
time returned by gettimeofday() or clock_gettime(CLOCK_REALTIME).
I've tried clock_gettime(CLOCK_REALTIME), it works fine.
I'm going to provide a patch soon.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message