Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
generic_threads.c File Reference
#include "generic_threads.h"
#include "gc_priv.h"
#include "gc_mark.h"

Go to the source code of this file.

Functions

static void mark_range (char *begin, char *end)
static void default_mark_all_stacks (GC_mark_range_proc marker)
static void default_proc (void *mutex)
void GC_generic_init_threads (GC_generic_mark_all_stacks_proc mark_all_stacks, void *mutex, GC_generic_proc locker, GC_generic_proc unlocker, GC_generic_proc stopper, GC_generic_proc starter)
void GC_push_all_stacks ()
void GC_stop_world ()
void GC_start_world ()

Variables

GC_generic_mark_all_stacks_proc GC_generic_mark_all_stacks = &default_mark_all_stacks
voidGC_generic_mutex = NULL
GC_generic_proc GC_generic_locker = &default_proc
GC_generic_proc GC_generic_unlocker = &default_proc
GC_generic_proc GC_generic_stopper = &default_proc
GC_generic_proc GC_generic_starter = &default_proc

Function Documentation

static void default_mark_all_stacks ( GC_mark_range_proc  marker) [static]

Definition at line 31 of file generic_threads.c.

{
#ifdef STACK_GROWS_DOWN
  mark_range(GC_approx_sp(), GC_get_stack_base());
#else
  mark_range(GC_get_stack_base(), GC_approx_sp());
#endif
}

Here is the call graph for this function:

static void default_proc ( void mutex) [static]

Definition at line 40 of file generic_threads.c.

{}
void GC_generic_init_threads ( GC_generic_mark_all_stacks_proc  mark_all_stacks,
void mutex,
GC_generic_proc  locker,
GC_generic_proc  unlocker,
GC_generic_proc  stopper,
GC_generic_proc  starter 
)

Definition at line 49 of file generic_threads.c.

{
  GC_generic_mark_all_stacks = mark_all_stacks;
  GC_generic_mutex = mutex;
  GC_generic_locker = locker;
  GC_generic_unlocker = unlocker;
  GC_generic_stopper = stopper;
  GC_generic_starter = starter;
       
  GC_dont_expand = 1;
  // GC_set_max_heap_size(20L * 1024L * 1024L);
}

Definition at line 66 of file generic_threads.c.

Here is the call graph for this function:

Definition at line 76 of file generic_threads.c.

Definition at line 71 of file generic_threads.c.

static void mark_range ( char *  begin,
char *  end 
) [static]

Definition at line 14 of file generic_threads.c.

{
  /* use the mark stack API, which will do more sanity checking. */
  GC_push_all(begin, end);
  /*
  while (begin < end) {
    GC_PUSH_ONE_STACK(*(word*)begin, 0);
    begin += ALIGNMENT;
  }
  */
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 44 of file generic_threads.c.

Definition at line 42 of file generic_threads.c.

Definition at line 43 of file generic_threads.c.

Definition at line 47 of file generic_threads.c.

Definition at line 46 of file generic_threads.c.

Definition at line 45 of file generic_threads.c.