summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 17:36:20 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 17:36:20 +0000
commit4e08026c7024f66543ce08f1f3960ad4db09566a (patch)
tree806deac745aa147ad65f5b221db0313d3f3623bc
parent1e19008db445a87f36091ca60662cbaacdd198f9 (diff)
downloadruby-4e08026c7024f66543ce08f1f3960ad4db09566a.tar.gz
ruby-4e08026c7024f66543ce08f1f3960ad4db09566a.tar.xz
ruby-4e08026c7024f66543ce08f1f3960ad4db09566a.zip
* thread_win32.c (w32_error): should report the function.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--thread_win32.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f589d3633..9e9cd1cf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec 31 02:35:57 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * thread_win32.c (w32_error): should report the function.
+
Thu Dec 31 01:58:47 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb: fix for extstatic.
diff --git a/thread_win32.c b/thread_win32.c
index 6bb29a1a4..1a7917e51 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -64,7 +64,7 @@ Init_native_thread(void)
}
static void
-w32_error(void)
+w32_error(const char *func)
{
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
@@ -74,14 +74,14 @@ w32_error(void)
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) & lpMsgBuf, 0, NULL);
- rb_bug("%s", (char*)lpMsgBuf);
+ rb_bug("%s: %s", func, (char*)lpMsgBuf);
}
static void
w32_set_event(HANDLE handle)
{
if (SetEvent(handle) == 0) {
- w32_error();
+ w32_error("w32_set_event");
}
}
@@ -89,7 +89,7 @@ static void
w32_reset_event(HANDLE handle)
{
if (ResetEvent(handle) == 0) {
- w32_error();
+ w32_error("w32_reset_event");
}
}
@@ -156,7 +156,7 @@ static void
w32_close_handle(HANDLE handle)
{
if (CloseHandle(handle) == 0) {
- w32_error();
+ w32_error("w32_close_handle");
}
}
@@ -164,7 +164,7 @@ static void
w32_resume_thread(HANDLE handle)
{
if (ResumeThread(handle) == -1) {
- w32_error();
+ w32_error("w32_resume_thread");
}
}
@@ -318,7 +318,7 @@ native_mutex_initialize(rb_thread_lock_t *lock)
#if USE_WIN32_MUTEX
*lock = CreateMutex(NULL, FALSE, NULL);
if (*lock == NULL) {
- w32_error();
+ w32_error("native_mutex_initialize");
}
/* thread_debug("initialize mutex: %p\n", *lock); */
#else