Back to index

glibc  2.9
Defines | Functions
tst-unload.c File Reference
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <gnu/lib-names.h>
#include "../test-skeleton.c"

Go to the source code of this file.

Defines

#define TEST_FUNCTION   do_test ()

Functions

static int do_test (void)

Define Documentation

#define TEST_FUNCTION   do_test ()

Definition at line 47 of file tst-unload.c.


Function Documentation

static int do_test ( void  ) [static]

Definition at line 26 of file tst-unload.c.

{
  void *p = dlopen (LIBPTHREAD_SO, RTLD_LAZY);

  if (p == NULL)
    {
      puts ("failed to load " LIBPTHREAD_SO);
      return 1;
    }

  if (dlclose (p) != 0)
    {
      puts ("dlclose (" LIBPTHREAD_SO ") failed");
      return 1;
    }

  puts ("seems to work");

  return 0;
}

Here is the call graph for this function: