From 5af25ecdb63e16f0a6840f28a5710ebd69071342 Mon Sep 17 00:00:00 2001 From: mirko Date: Tue, 24 May 2011 15:53:47 +0000 Subject: [PATCH] [backport] [toolchain/uclibc] use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)' this eliminates a source of reproduceable freezes http://lists.uclibc.org/pipermail/uclibc/2011-May/045367.html git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@27002 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../350-use-fputs_unlocked.patch | 21 +++++++++++++++++++ .../350-use-fputs_unlocked.patch | 21 +++++++++++++++++++ .../350-use-fputs_unlocked.patch | 21 +++++++++++++++++++ .../350-use-fputs_unlocked.patch | 21 +++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 toolchain/uClibc/patches-0.9.30+nptl/350-use-fputs_unlocked.patch create mode 100644 toolchain/uClibc/patches-0.9.30.1/350-use-fputs_unlocked.patch create mode 100644 toolchain/uClibc/patches-0.9.30.2/350-use-fputs_unlocked.patch create mode 100644 toolchain/uClibc/patches-0.9.30.3/350-use-fputs_unlocked.patch diff --git a/toolchain/uClibc/patches-0.9.30+nptl/350-use-fputs_unlocked.patch b/toolchain/uClibc/patches-0.9.30+nptl/350-use-fputs_unlocked.patch new file mode 100644 index 000000000..b2cd37fdd --- /dev/null +++ b/toolchain/uClibc/patches-0.9.30+nptl/350-use-fputs_unlocked.patch @@ -0,0 +1,21 @@ +commit 3e3ae40f053b22fbb9bef50067d6edad4c358c4c +Author: Mirko Vogt +Date: Tue May 24 14:36:42 2011 +0200 + + use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)' + + this eliminates a source of reproduceable freezes + +diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c +index 3db8cdf..069db16 100644 +--- a/libc/stdio/_vfprintf.c ++++ b/libc/stdio/_vfprintf.c +@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf + #define STRLEN wcslen + #define _PPFS_init _ppwfs_init + /* Pulls in fseek: */ +-#define OUTPUT(F,S) fputws(S,F) ++#define OUTPUT(F,S) fputws_unlocked(S,F) + /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */ + #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream) + #define FP_OUT _fp_out_wide diff --git a/toolchain/uClibc/patches-0.9.30.1/350-use-fputs_unlocked.patch b/toolchain/uClibc/patches-0.9.30.1/350-use-fputs_unlocked.patch new file mode 100644 index 000000000..b2cd37fdd --- /dev/null +++ b/toolchain/uClibc/patches-0.9.30.1/350-use-fputs_unlocked.patch @@ -0,0 +1,21 @@ +commit 3e3ae40f053b22fbb9bef50067d6edad4c358c4c +Author: Mirko Vogt +Date: Tue May 24 14:36:42 2011 +0200 + + use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)' + + this eliminates a source of reproduceable freezes + +diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c +index 3db8cdf..069db16 100644 +--- a/libc/stdio/_vfprintf.c ++++ b/libc/stdio/_vfprintf.c +@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf + #define STRLEN wcslen + #define _PPFS_init _ppwfs_init + /* Pulls in fseek: */ +-#define OUTPUT(F,S) fputws(S,F) ++#define OUTPUT(F,S) fputws_unlocked(S,F) + /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */ + #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream) + #define FP_OUT _fp_out_wide diff --git a/toolchain/uClibc/patches-0.9.30.2/350-use-fputs_unlocked.patch b/toolchain/uClibc/patches-0.9.30.2/350-use-fputs_unlocked.patch new file mode 100644 index 000000000..b2cd37fdd --- /dev/null +++ b/toolchain/uClibc/patches-0.9.30.2/350-use-fputs_unlocked.patch @@ -0,0 +1,21 @@ +commit 3e3ae40f053b22fbb9bef50067d6edad4c358c4c +Author: Mirko Vogt +Date: Tue May 24 14:36:42 2011 +0200 + + use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)' + + this eliminates a source of reproduceable freezes + +diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c +index 3db8cdf..069db16 100644 +--- a/libc/stdio/_vfprintf.c ++++ b/libc/stdio/_vfprintf.c +@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf + #define STRLEN wcslen + #define _PPFS_init _ppwfs_init + /* Pulls in fseek: */ +-#define OUTPUT(F,S) fputws(S,F) ++#define OUTPUT(F,S) fputws_unlocked(S,F) + /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */ + #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream) + #define FP_OUT _fp_out_wide diff --git a/toolchain/uClibc/patches-0.9.30.3/350-use-fputs_unlocked.patch b/toolchain/uClibc/patches-0.9.30.3/350-use-fputs_unlocked.patch new file mode 100644 index 000000000..b2cd37fdd --- /dev/null +++ b/toolchain/uClibc/patches-0.9.30.3/350-use-fputs_unlocked.patch @@ -0,0 +1,21 @@ +commit 3e3ae40f053b22fbb9bef50067d6edad4c358c4c +Author: Mirko Vogt +Date: Tue May 24 14:36:42 2011 +0200 + + use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)' + + this eliminates a source of reproduceable freezes + +diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c +index 3db8cdf..069db16 100644 +--- a/libc/stdio/_vfprintf.c ++++ b/libc/stdio/_vfprintf.c +@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf + #define STRLEN wcslen + #define _PPFS_init _ppwfs_init + /* Pulls in fseek: */ +-#define OUTPUT(F,S) fputws(S,F) ++#define OUTPUT(F,S) fputws_unlocked(S,F) + /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */ + #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream) + #define FP_OUT _fp_out_wide -- 2.35.1