From 20f77eda55f874b939719ac0abda4405ecd20bf8 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 18 Jan 1999 23:50:07 +0000 Subject: Tue Jan 19 18:27:42 1999 Ross Johnson * pthread.h (pthreadCancelableTimedWait): New prototype. (pthreadCancelableWait): Remove second argument. * misc.c (CancelableWait): New static function is pthreadCancelableWait() renamed. (pthreadCancelableWait): Now just calls CancelableWait() with INFINITE timeout. (pthreadCancelableTimedWait): Just calls CancelableWait() with passed in timeout. * private.c (_pthread_sem_timedwait): 'abstime' arg really is absolute time. Calculate relative time to wait from current time before passing timeout to new routine pthreadCancelableTimedWait(). - Scott Lightner --- pthread.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pthread.h') diff --git a/pthread.h b/pthread.h index 861a0e8..aa48b32 100644 --- a/pthread.h +++ b/pthread.h @@ -918,10 +918,12 @@ int pthread_attr_setschedparam (pthread_attr_t *attr, * WaitForMultipleObjects * * on 'waitHandle' and a manually reset WIN32 Event - * used to implement pthread_cancel. The 'abstime' - * argument is simply passed to WaitForMultipleObjects. + * used to implement pthread_cancel. The 'timeout' + * argument to TimedWait is simply passed to + * WaitForMultipleObjects. */ -int pthreadCancelableWait (HANDLE waitHandle, DWORD abstime); +int pthreadCancelableWait (HANDLE waitHandle); +int pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); /* * Thread-Safe C Runtime Library Mappings -- cgit v1.2.3