From ff0f91fa40ebd84d429dd3feeec1c58f5ad8efa4 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 22 Jul 2010 15:34:46 +0200 Subject: [PATCH] UCW: Adapted to use ucw_thread_id() --- ucw/tempfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucw/tempfile.c b/ucw/tempfile.c index f8b0294b..76d9cd38 100644 --- a/ucw/tempfile.c +++ b/ucw/tempfile.c @@ -61,10 +61,10 @@ temp_file_name(char *name_buf, int *open_flags) struct ucwlib_context *ctx = ucwlib_thread_context(); int cnt = ++ctx->temp_counter; int pid = getpid(); - if (ctx->thread_id == pid) + if (ucwlib_thread_id(ctx) == pid) len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%d-%d", dir, temp_prefix, pid, cnt); else - len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%d-%d-%d", dir, temp_prefix, pid, ctx->thread_id, cnt); + len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%d-%d-%d", dir, temp_prefix, pid, ucwlib_thread_id(ctx), cnt); if (open_flags) *open_flags = 0; } -- 2.39.5