apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52940] New: apr_thread_cond_timedwait() can't wait more than 1.5 hours
Date Mon, 19 Mar 2012 05:10:19 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52940

             Bug #: 52940
           Summary: apr_thread_cond_timedwait() can't wait more than 1.5
                    hours
           Product: APR
           Version: 1.4.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: lusonchinapub@163.com
    Classification: Unclassified


APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
apr_thread_mutex_t *mutex, apr_interval_time_t timeout)
{
    DWORD timeout_ms = (DWORD) apr_time_as_msec(timeout);
    return _thread_cond_timedwait(cond, mutex, timeout_ms);
}

static APR_INLINE apr_status_t _thread_cond_timedwait(apr_thread_cond_t *cond,
apr_thread_mutex_t *mutex, DWORD timeout_ms )

Since apr_interval_time_t is defined as apr_int64_t and DWORD as unsigned long
and parameter timeout means the amount of time in microseconds to wait,
apr_thread_cond_timedwait() can't wait more than 1.5 hours.

One way to fix it may be replacing DWORD with __int64 or long long.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message