diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | ext/thread/thread.c | 26 |
2 files changed, 22 insertions, 6 deletions
@@ -1,4 +1,4 @@ -Fri Feb 9 20:34:33 2007 MenTaLguY <mental@rydia.net> +Fri Feb 9 20:43:01 2007 Akinori MUSHA <knu@iDaemons.org> * ext/thread: Import the "fastthread" implementation by MenTaLguY in the original form. This module is not hooked into the build diff --git a/ext/thread/thread.c b/ext/thread/thread.c index 23dca6aa74..d4443ba9ac 100644 --- a/ext/thread/thread.c +++ b/ext/thread/thread.c @@ -39,8 +39,11 @@ typedef struct _List { unsigned long size; } List; +static void init_list _((List *)); + static void -init_list(List *list) +init_list(list) + List *list; { list->entries = NULL; list->last_entry = NULL; @@ -48,8 +51,11 @@ init_list(List *list) list->size = 0; } +static void mark_list _((List *)); + static void -mark_list(List *list) +mark_list(list) + List *list; { Entry *entry; for ( entry = list->entries ; entry ; entry = entry->next ) { @@ -57,8 +63,11 @@ mark_list(List *list) } } +static void free_entries _((Entry *)); + static void -free_entries(Entry *first) +free_entries(first) + Entry *first; { Entry *next; while (first) { @@ -68,15 +77,22 @@ free_entries(Entry *first) } } +static void finalize_list _((List *)); + static void -finalize_list(List *list) +finalize_list(list) + List *list; { free_entries(list->entries); free_entries(list->entry_pool); } +static void push_list _((List *, VALUE)); + static void -push_list(List *list, VALUE value) +push_list(list, value) + List *list; + VALUE value; { Entry *entry; |