diff options
Diffstat (limited to 'games/quakeforge/patches/patch-an')
-rw-r--r-- | games/quakeforge/patches/patch-an | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/games/quakeforge/patches/patch-an b/games/quakeforge/patches/patch-an index 6e2ac61377d..2d7024c183d 100644 --- a/games/quakeforge/patches/patch-an +++ b/games/quakeforge/patches/patch-an @@ -1,13 +1,35 @@ -$NetBSD: patch-an,v 1.1 2008/01/23 04:59:36 tnn Exp $ +$NetBSD: patch-an,v 1.2 2013/03/28 21:25:52 joerg Exp $ --- libs/gib/gib_thread.c.orig 2003-09-11 06:03:10.000000000 +0000 +++ libs/gib/gib_thread.c -@@ -89,7 +89,7 @@ GIB_Thread_Count (void) +@@ -86,19 +86,21 @@ GIB_Thread_Count (void) + return llist_size (gib_threads); + } + ++static qboolean ++thread_exec_iterator (void *dummy, cbuf_t *cbuf, llist_node_t *node) ++{ ++ if (GIB_DATA(cbuf)->program) ++ Cbuf_Execute_Stack (cbuf); ++ else ++ Cbuf_DeleteStack ((cbuf_t *) llist_remove (node)); ++ return true; ++} ++ void GIB_Thread_Execute (void) { - static qboolean iterator (cbuf_t *cbuf, llist_node_t *node) -+ qboolean iterator (cbuf_t *cbuf, llist_node_t *node) - { - if (GIB_DATA(cbuf)->program) - Cbuf_Execute_Stack (cbuf); +- { +- if (GIB_DATA(cbuf)->program) +- Cbuf_Execute_Stack (cbuf); +- else +- Cbuf_DeleteStack ((cbuf_t *) llist_remove (node)); +- return true; +- } + +- llist_iterate (gib_threads, LLIST_ICAST (iterator)); ++ llist_iterate (gib_threads, thread_exec_iterator, NULL); + } + + void |