pthread_cond_timedwait: added error cases for abstime

This commit is contained in:
Mark Johannes
1996-08-14 17:20:03 +00:00
parent 87c8fd09ed
commit aae1c9324a
2 changed files with 22 additions and 0 deletions
+11
View File
@@ -447,6 +447,17 @@ int pthread_cond_timedwait(
const struct timespec *abstime
)
{
if ( !abstime )
return EINVAL;
/* XXX need to fully address an error occuring in the total timespec */
if ( abstime->tv_sec < 0 || abstime->tv_nsec < 0 )
return EINVAL;
if ( abstime->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return EINVAL;
return _POSIX_Condition_variables_Wait_support(
cond,
mutex,
+11
View File
@@ -447,6 +447,17 @@ int pthread_cond_timedwait(
const struct timespec *abstime
)
{
if ( !abstime )
return EINVAL;
/* XXX need to fully address an error occuring in the total timespec */
if ( abstime->tv_sec < 0 || abstime->tv_nsec < 0 )
return EINVAL;
if ( abstime->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return EINVAL;
return _POSIX_Condition_variables_Wait_support(
cond,
mutex,