From 92d29093280cc14ccdb91f166332c07fc3b2370a Mon Sep 17 00:00:00 2001 From: kan Date: Sun, 19 Jun 2011 13:35:46 +0000 Subject: Put a quick bandaid on internal citrus locking. The code is not quite right still, but it programs from deadlocking on themselves if one enables new citrus code by mistake. --- lib/libc/iconv/citrus_mapper.c | 2 ++ lib/libc/iconv/iconv.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libc') diff --git a/lib/libc/iconv/citrus_mapper.c b/lib/libc/iconv/citrus_mapper.c index a788a9d9..b5ae96d 100644 --- a/lib/libc/iconv/citrus_mapper.c +++ b/lib/libc/iconv/citrus_mapper.c @@ -337,7 +337,9 @@ _citrus_mapper_open(struct _citrus_mapper_area *__restrict ma, goto quit; /* open mapper */ + UNLOCK; ret = mapper_open(ma, &cm, module, variable); + WLOCK; if (ret) goto quit; cm->cm_key = strdup(mapname); diff --git a/lib/libc/iconv/iconv.c b/lib/libc/iconv/iconv.c index 2cd38df..d1e01e8 100644 --- a/lib/libc/iconv/iconv.c +++ b/lib/libc/iconv/iconv.c @@ -85,7 +85,7 @@ _iconv_open(const char *out, const char *in, struct _citrus_iconv *prealloc) errno = ENOMEM; return ((iconv_t)-1); } - + p = out_truncated; while (*p != 0) { if (p[0] == '/' && p[1] == '/') { -- cgit v1.1