2013-09-26 17:14:40 +02:00

36 lines
841 B
Plaintext

$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
@@ -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)
- {
- 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