search for: libxl__init_recursive_mutex

Displaying 1 result from an estimated 1 matches for "libxl__init_recursive_mutex".

2012 Jan 26
1
[PATCH v2] libxl: fix mutex initialization
..._ctx)); ctx->lg = lg; - /* This somewhat convoluted approach is needed because - * PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is defined to be valid - * only as an initialiser, not as an expression. */ - memcpy(&ctx->lock, &mutex_value, sizeof(ctx->lock)); + if (libxl__init_recursive_mutex(ctx, &ctx->lock) < 0) { + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Failed to initialize mutex"); + return ERROR_FAIL; + } if ( stat(XENSTORE_PID_FILE, &stat_buf) != 0 ) { LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Is xenstore daemon running?\n&q...