Back to index

glibc  2.9
Functions
ex16.c File Reference
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>

Go to the source code of this file.

Functions

static void * task (void *p)
int main (void)

Function Documentation

int main ( void  )

Definition at line 14 of file ex16.c.

{
  pthread_t t;
  int status;

  status = pthread_create (&t, NULL, task, NULL);
  if (status)
    exit (status);

  status = pthread_detach (t);
  pthread_kill_other_threads_np ();
  return status;
}

Here is the call graph for this function:

static void* task ( void *  p) [static]

Definition at line 7 of file ex16.c.

{
  sleep (30);
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function: