LibHTTP API Reference

December 20, 2016 ยท View on GitHub

httplib_pthread_cond_init( cv, attr );

Parameters

ParameterTypeDescription
cvpthread_cond_t *Storage for the condition variable when the function is successful
attrconst pthread_condattr_t *Optional attributes for creating the condition variable

Return Value

TypeDescription
intInteger value with a success or error code of the function call

Description

The platform independent function htptlib_pthread_cond_init() allocates a condition variable which can be used for letting threads wait for a specific condition. The variable is returned in a location pointed to by a parameter. If the function is successful the value 0 is returned. Otherwise the function returns an error code. On systems which support it, the functionality is implemented as a direct call to pthrea_cond_init(). Otherwise own code is used which emulates the same behaviour. Please note that the attr parameter is ignored when the function is used on Windows.

See Also