Back to index

glibc  2.9
Defines | Functions | Variables
tst-tlsmod18a.c File Reference
#include <stdio.h>

Go to the source code of this file.

Defines

#define N   0

Functions

int test (void)

Variables

static __thread int var = 4

Define Documentation

#define N   0

Definition at line 4 of file tst-tlsmod18a.c.


Function Documentation

int test ( void  )

Definition at line 10 of file tst-tlsmod18a.c.

{
  int *p = &var;
  /* GCC assumes &var is never NULL, add optimization barrier.  */
  asm volatile ("" : "+r" (p));
  if (p == NULL || *p != 4)
    {
      printf ("fail %d %p\n", N, p);
      return 1;
    }
  return 0;
}

Here is the call graph for this function:


Variable Documentation

__thread int var = 4 [static]

Definition at line 7 of file tst-tlsmod18a.c.