本文整理汇总了C++中ERRVAL函数的典型用法代码示例。如果您正苦于以下问题:C++ ERRVAL函数的具体用法?C++ ERRVAL怎么用?C++ ERRVAL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ERRVAL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ldap_pvt_thread_rdwr_wunlock
int ldap_pvt_thread_rdwr_wunlock( ldap_pvt_thread_rdwr_t *rw )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_rwlock_unlock( rw ) );
LDAP_ENSURE(rc == 0);
LDAP_JITTER(25);
return rc;
}
示例2: ldap_pvt_thread_rdwr_wtrylock
int ldap_pvt_thread_rdwr_wtrylock( ldap_pvt_thread_rdwr_t *rw )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_rwlock_trywrlock( rw ) );
LDAP_ENSURE(rc == 0 || rc == EBUSY);
LDAP_JITTER(25);
return rc;
}
示例3: ldap_pvt_thread_join
int
ldap_pvt_thread_join( ldap_pvt_thread_t thread, void **thread_return )
{
#if HAVE_PTHREADS < 7
void *dummy;
if (thread_return==NULL)
thread_return=&dummy;
#endif
return ERRVAL( pthread_join( thread, thread_return ) );
}
示例4: ldap_pvt_thread_rdwr_init
int
ldap_pvt_thread_rdwr_init( ldap_pvt_thread_rdwr_t *rw )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_rwlock_init( rw, NULL ) );
LDAP_ENSURE(rc == 0);
LDAP_JITTER(25);
return rc;
}
示例5: ldap_pvt_thread_mutex_unlock
int
ldap_pvt_thread_mutex_unlock( ldap_pvt_thread_mutex_t *mutex )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_mutex_unlock( mutex ) );
LDAP_ENSURE(rc == 0);
LDAP_JITTER(25);
return rc;
}
示例6: ldap_pvt_thread_mutex_init
int
ldap_pvt_thread_mutex_init( ldap_pvt_thread_mutex_t *mutex )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_mutex_init( mutex, ldap_mutex_attr() ) );
LDAP_ENSURE(rc == 0);
LDAP_JITTER(25);
return rc;
}
示例7: ldap_pvt_thread_cond_broadcast
int
ldap_pvt_thread_cond_broadcast( ldap_pvt_thread_cond_t *cond )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_cond_broadcast( cond ) );
LDAP_ENSURE(rc == 0);
LDAP_JITTER(25);
return rc;
}
示例8: ldap_pvt_thread_cond_init
int
ldap_pvt_thread_cond_init( ldap_pvt_thread_cond_t *cond )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_cond_init( cond, LDAP_INT_THREAD_CONDATTR_DEFAULT ) );
LDAP_ENSURE(rc == 0);
LDAP_JITTER(25);
return rc;
}
示例9: ldap_pvt_thread_cond_wait
int
ldap_pvt_thread_cond_wait( ldap_pvt_thread_cond_t *cond,
ldap_pvt_thread_mutex_t *mutex )
{
int rc;
LDAP_JITTER(25);
rc = ERRVAL( pthread_cond_wait( cond, mutex ) );
LDAP_ENSURE(rc == 0);
LDAP_JITTER(25);
return rc;
}
示例10: ldap_pvt_thread_kill
int
ldap_pvt_thread_kill( ldap_pvt_thread_t thread, int signo )
{
#if defined(HAVE_PTHREAD_KILL) && HAVE_PTHREADS > 4
/* MacOS 10.1 is detected as v10 but has no pthread_kill() */
return ERRVAL( pthread_kill( thread, signo ) );
#else
/* pthread package with DCE */
if (kill( getpid(), signo )<0)
return errno;
return 0;
#endif
}
示例11: ldap_pvt_thread_mutex_unlock
int
ldap_pvt_thread_mutex_unlock( ldap_pvt_thread_mutex_t *mutex )
{
return ERRVAL( pthread_mutex_unlock( mutex ) );
}
示例12: ldap_pvt_thread_mutex_init
int
ldap_pvt_thread_mutex_init( ldap_pvt_thread_mutex_t *mutex )
{
return ERRVAL( pthread_mutex_init(
mutex, LDAP_INT_THREAD_MUTEXATTR_DEFAULT ) );
}
示例13: ldap_pvt_thread_mutex_destroy
int
ldap_pvt_thread_mutex_destroy( ldap_pvt_thread_mutex_t *mutex )
{
return ERRVAL( pthread_mutex_destroy( mutex ) );
}
示例14: ldap_pvt_thread_cond_wait
int
ldap_pvt_thread_cond_wait( ldap_pvt_thread_cond_t *cond,
ldap_pvt_thread_mutex_t *mutex )
{
return ERRVAL( pthread_cond_wait( cond, mutex ) );
}
示例15: ldap_pvt_thread_cond_broadcast
int
ldap_pvt_thread_cond_broadcast( ldap_pvt_thread_cond_t *cond )
{
return ERRVAL( pthread_cond_broadcast( cond ) );
}