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] Updated: (HARMONY-5106) [drlvm][thread] os_thread_yield_other() works incorrectly on Linux
Date Sun, 11 Nov 2007 13:50:50 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Ilya Berezhniuk updated HARMONY-5106:

    Attachment: H-5106.patch

Here is the fix for this problem.

Note to committer:
I've put exceed time calculation into separate function.
This function is now called from single place, so I used "inline __attribute__((always_inline))".
Please delete this modifiers if they are not portable.

> [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
>         Attachments: H-5106.patch
> os_thread_yield_other() function on Linux uses sem_timedwait() to wait for response from
SIGUSR2 handler.
> 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 immediately.
> 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