Back to index

lightning-sunbird  0.9+nobinonly
generic_threads.h
Go to the documentation of this file.
00001 /*
00002        generic_threads.c
00003        
00004        A module that permits clients of the GC to supply callback functions
00005        for thread stack scanning.
00006        
00007        by Patrick C. Beard.
00008  */
00009 
00010 #ifndef __GENERIC_THREADS__
00011 #define __GENERIC_THREADS__
00012 
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016 
00020 typedef void (*GC_mark_range_proc) (char* begin, char* end);
00021 
00025 typedef void (*GC_generic_mark_all_stacks_proc) (GC_mark_range_proc marker);
00026 
00027 extern GC_generic_mark_all_stacks_proc GC_generic_mark_all_stacks;
00028 
00032 typedef void (*GC_generic_proc) (void* mutex);
00033 
00034 extern void* GC_generic_mutex;
00035 extern GC_generic_proc GC_generic_locker;
00036 extern GC_generic_proc GC_generic_unlocker;
00037 extern GC_generic_proc GC_generic_stopper;
00038 extern GC_generic_proc GC_generic_starter;
00039 
00040 extern void GC_generic_init_threads(GC_generic_mark_all_stacks_proc mark_all_stacks,
00041                                                                void* mutex,
00042                                                                GC_generic_proc locker, GC_generic_proc unlocker,
00043                                                                GC_generic_proc stopper, GC_generic_proc starter);
00044                                                                
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048 
00049 #endif /* __GENERIC_THREADS__ */