Back to index

glibc  2.9
libc_pthread_init.c File Reference
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <tls.h>
#include "internals.h"
#include <sysdep-cancel.h>

Go to the source code of this file.


int__libc_pthread_init (struct pthread_functions *functions) const

Function Documentation

int* __libc_pthread_init ( struct pthread_functions functions) const

Definition at line 28 of file libc_pthread_init.c.

#ifdef SHARED
  /* We copy the content of the variable pointed to by the FUNCTIONS
     parameter to one in since this means access to the array
     can be done with one memory access instead of two.  */
  memcpy (&__libc_pthread_functions, functions,
         sizeof (__libc_pthread_functions));

  /* Initialize thread-locale current locale to point to the global one.
     With __thread support, the variable's initializer takes care of this.  */
  __uselocale (LC_GLOBAL_LOCALE);

  return &__libc_multiple_threads;

Here is the call graph for this function: