Beispiel #1
0
int main()
{
  const char *libname = "pendshr2.sl";
  void *h;
  int (*p_func) (int);

  pendfunc (3);
  pendfunc (4);
  pendfunc (3);

  marker ();

  h = dlopen (libname, RTLD_LAZY);
  if (h == NULL) return 1;

  p_func = dlsym (h, "pendfunc2");
  if (p_func == NULL) return 2;

  (*p_func) (4);

  marker ();

  dlclose (h);
  return 0;
}
Beispiel #2
0
int main()
{
  pendfunc (3); /* break main here */
  pendfunc (4);
  k = 1;
  pendfunc (3);
  return 0;
}
Beispiel #3
0
int main()
{
  int res;
  pthread_t threads[NUM];
  int i;

  pendfunc (3);
  pendfunc (4);

  for (i = 0; i < NUM; i++)
    {
      res = pthread_create (&threads[i],
			     NULL,
			     &thread_func,
			     NULL);
    }

  for (i = 0; i < NUM; i++) {
    res = pthread_join (threads[i], NULL);
  }

  return 0;
}
int
main (void)
{
  pendfunc ();
  return 0; /* set breakpoint 1 here */
}