[Gtkradiant] patch [attached] for pthread_join() fix in ZeroRadiant
divVerent at alientrap.org
Mon Nov 15 00:32:07 CST 2010
On Fri, Nov 12, 2010 at 07:49:40PM -0800, Nerius Landys wrote:
> I fixed the bug mentioned in a previous email. See attachment.
> Can someone please apply this to trunk ASAP?
> Or just give me commit access? :-)
> I might fix other bugs too.
> - Rambetter
> Index: tools/quake3/common/threads.c
> --- tools/quake3/common/threads.c (revision 332)
> +++ tools/quake3/common/threads.c (working copy)
> @@ -520,7 +520,8 @@
> pthread_t work_threads[MAX_THREADS];
> int start, end;
> - int i=0, status=0;
> + int i=0;
> + void *exit_value;
> start = I_FloatTime ();
> pacifier = showpacifier;
> @@ -556,7 +557,7 @@
> for (i=0 ; i<numthreads ; i++)
> - if(pthread_join(work_threads[i], (void **)&status) != 0)
> + if(pthread_join(work_threads[i], &exit_value) != 0)
> Error("pthread_join failed");
An alternate fix, that happened before NetRadiant was forked apparently (when
it was a patchset only), is to declare status as pthread_addr_t. But this one
should work fine as well.
More information about the Gtkradiant