src/mutex.c
/**
 * Destroys and frees a mutex attribute.
 *
 * @param attribute A mutex attribute.
 * @return 0 if successful or 1 if an error occurred.
 */
Destroys and frees a mutex attribute.
@param attribute A mutex attribute.
@return 0 if successful or 1 if an error occurred.
Destroys and frees a mutex attribute . @param attribute A mutex attribute . @return 0 if successful or 1 if an error occurred .
int destroyMutexAttribute(pthread_mutexattr_t *attribute) {
    if (NULL == attribute) {
	    printError(
		    0,
		    __FILE__,
		    __PRETTY_FUNCTION__,
		    "Could not destroy attribute as it is null."
	    );
        return 1;
    }
    if (0 != (errno = pthread_mutexattr_destroy(attribute))) {
	    printError(
		    errno,
		    __FILE__,
		    __PRETTY_FUNCTION__,
		    "Could not destroy attribute."
	    );
        return 1;
    }
    free(attribute);
    return 0;
}
int destroyMutexAttribute ( pthread_mutexattr_t * attribute ) { if ( NULL == attribute ) { printError ( 0 , __FILE__ , __PRETTY_FUNCTION__ , " " ) ; return 1 ; } if ( 0 != ( errno = pthread_mutexattr_destroy ( attribute ) ) ) { printError ( errno , __FILE__ , __PRETTY_FUNCTION__ , " " ) ; return 1 ; } free ( attribute ) ; return 0 ; }
Destroys and frees a mutex attribute.
Destroys and frees a mutex attribute .