Modify os_cond_reltimedwait to support long time wait (#461)
Modify the argument of os_cond_reltimedwait to uint64 type to support long time wait, and handle possible integer overflow.
This commit is contained in:
@ -6,6 +6,8 @@
|
||||
#ifndef _WAMR_LIB_PTHREAD_H
|
||||
#define _WAMR_LIB_PTHREAD_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Data type define of pthread, mutex, cond and key */
|
||||
typedef unsigned int pthread_t;
|
||||
typedef unsigned int pthread_mutex_t;
|
||||
@ -41,7 +43,7 @@ int pthread_cond_init(pthread_cond_t *cond, const void *attr);
|
||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
|
||||
|
||||
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||
unsigned int useconds);
|
||||
uint64_t useconds);
|
||||
|
||||
int pthread_cond_signal(pthread_cond_t *cond);
|
||||
|
||||
@ -56,4 +58,4 @@ void *pthread_getspecific(pthread_key_t key);
|
||||
|
||||
int pthread_key_delete(pthread_key_t key);
|
||||
|
||||
#endif /* end of _WAMR_LIB_PTHREAD_H */
|
||||
#endif /* end of _WAMR_LIB_PTHREAD_H */
|
||||
|
||||
Reference in New Issue
Block a user