OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libmudflap/] [testsuite/] [libmudflap.cth/] [pass59-frag.c] - Blame information for rev 766

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 738 jeremybenn
#include <stdio.h>
2
#include <pthread.h>
3
 
4
/* PR 28578 */
5
 
6
void* test_thread(void* arg)
7
{
8
  printf("Hello from thread!\n");
9
  pthread_exit(NULL);
10
  return 0;
11
}
12
 
13
int main()
14
{
15
  pthread_t thread;
16
  void *arg = NULL;
17
  pthread_create(&thread, NULL, test_thread, arg);
18
  pthread_join(thread, NULL);
19
  pthread_exit(NULL);
20
  return 0;
21
}
22
 
23
/* { dg-output "Hello from thread!\n" } */
24
 
25
#if 0
26
 
27
/* Even this test case replicates the problem.  However, when built in
28
   static mode, it blows up during __mf_init (?!?!?!) with a
29
   pthread_mutex_lock deadlock error. */
30
 
31
#include <stdio.h>
32
#include <pthread.h>
33
 
34
int main ()
35
{
36
      pthread_exit(NULL);
37
      return 0;
38
}
39
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.