cygwin: simplify pthread timedwait handling
- Introduce inline helper pthread_convert_abstime. It converts an absolute timespec to a Windows LARGE_INTEGER timestamp, depending on the used clock. - Use this function from pthread_cond_timedwait and semaphore::timedwait - Merge semaphore::_wait and semaphore::_timedwait into single _wait method, taking a LARGER_INTEGER timestamp. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -693,11 +693,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
int _wait ();
|
||||
void _post ();
|
||||
int _getvalue (int *sval);
|
||||
int _trywait ();
|
||||
int _timedwait (const struct timespec *abstime);
|
||||
int _wait (PLARGE_INTEGER timeout = NULL);
|
||||
|
||||
void _fixup_before_fork ();
|
||||
void _fixup_after_fork ();
|
||||
|
Reference in New Issue
Block a user