[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lanes report error when script ends
- From: Martin Krpan <wtxnh-lua@...>
- Date: Wed, 29 Dec 2010 00:44:47 +0100
On Tue, Dec 28, 2010 at 09:00:35PM +0100, Martin Krpan wrote:
> When I run example form doc that introduce linda it runs fine.
> If I then add a line
> linda:limit("x", 3)
> output is like this:
I found what was wrong here. It is a bug in linda_send function.
patch is attached.
Also I builded library with crosscompiler i586-mingw32msvc-gcc
and had to change some #if defined lines. patch is also attached.
And finaly: I do not use msvcr80.dll so I had to comment out
line in src/threading.h or else it would not link.
# define mktime _mktime32
Martin
diff -r 108d3c72c9d7 src/lanes.c
--- a/src/lanes.c Mon Dec 06 16:57:10 2010 +0100
+++ b/src/lanes.c Wed Dec 29 00:04:38 2010 +0100
@@ -529,7 +529,7 @@
prev_status = s->status;
s->status = WAITING;
}
- if (!SIGNAL_WAIT( &linda->write_happened, &K->lock_, timeout )) {
+ if (!SIGNAL_WAIT( &linda->read_happened, &K->lock_, timeout )) {
if (s) { s->status = prev_status; }
break;
}
diff -r 108d3c72c9d7 src/lanes.c
--- a/src/lanes.c Mon Dec 06 16:57:10 2010 +0100
+++ b/src/lanes.c Wed Dec 29 00:04:38 2010 +0100
@@ -1239,7 +1239,7 @@
}
#endif
-#if defined PLATFORM_WIN32
+#if defined PLATFORM_WIN32 && !defined __GNUC__
//see http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
#define MS_VC_EXCEPTION 0x406D1388
#pragma pack(push,8)
@@ -1284,7 +1284,7 @@
lua_State *L= s->L;
-#if defined PLATFORM_WIN32
+#if defined PLATFORM_WIN32 && !defined __GNUC__
SetThreadName(-1, s->threadName);
#endif