Skip to content

Commit a0380cd

Browse files
committed
common BUGFIX portable pthread_t equality check
1 parent 0c8f0b7 commit a0380cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ly_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ _ly_ctx_private_data_get(const struct ly_ctx *ctx, ly_bool own_data_only)
240240

241241
LY_ARRAY_FOR(ly_private_ctx_data, struct ly_ctx_private_data *, iter) {
242242
/* either own - ctx and tid match, or "context's" - thread does not matter */
243-
if (((*iter)->ctx == ctx) && (!own_data_only || ((*iter)->tid == tid))) {
243+
if (((*iter)->ctx == ctx) && (!own_data_only || pthread_equal((*iter)->tid, tid))) {
244244
found = 1;
245245
break;
246246
}

0 commit comments

Comments
 (0)