GC API: Difference between revisions

30 bytes added ,  23 April 2008
callbacks need closures, duh
(gc_set_thread_affinity)
(callbacks need closures, duh)
 
Line 185: Line 185:


  typedef void (*gc_callback)(
  typedef void (*gc_callback)(
   gc_GCStatus state);
   gc_GCStatus state, void *closure);


  void '''gc_add_callback'''(gc_callback callback);
  void '''gc_add_callback'''(gc_callback callback, void *closure);


Register a callback function. If '''gc_set_thread_affinity''' has been called, the callback will occur on the specified thread.
Register a callback function. If '''gc_set_thread_affinity''' has been called, the callback will occur on the specified thread.
Confirmed users, Bureaucrats and Sysops emeriti
1,217

edits