Back to index

glibc  2.9
Functions
bb_init_func.c File Reference
#include <sys/types.h>
#include <sys/gmon.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

void __bb_init_func (struct __bb *bb)

Function Documentation

void __bb_init_func ( struct __bb bb)

Definition at line 32 of file bb_init_func.c.

{
  struct gmonparam *p = &_gmonparam;

  if (bb->zero_word != 0)
    {
      return; /* handle common case quickly */
    }

  /* insert this basic-block into basic-block list: */
  bb->zero_word = 1;
  bb->next = __bb_head;
  __bb_head = bb;

  if (bb->next == 0 && p->state != GMON_PROF_ON)
    {
      /* we didn't register _mcleanup yet and pc profiling doesn't seem
        to be active, so let's register it now: */
      extern void *__dso_handle __attribute__ ((__weak__));
      __cxa_atexit ((void (*) (void *)) _mcleanup, NULL,
                  &__dso_handle ? __dso_handle : NULL);
    }
}

Here is the call graph for this function: