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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [sh/] [pr43417.c] - Blame information for rev 859

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

Line No. Rev Author Line
1 325 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -m4" } */
3
 
4
int pid_count = 0;
5
main (int argc, char *argv[])
6
{
7
  unsigned int c;
8
  unsigned long long maxbytes = 0;
9
  extern char *optarg;
10
  int i;
11
  int pid_cntr;
12
  int pid;
13
  int pid_list[1000];
14
  while ((c = getopt (argc, argv, "c:b:p:wvh")) != (-1))
15
    {
16
      switch ((char) c)
17
        {
18
        case 'b':
19
          maxbytes = atoll (optarg);
20
        }
21
    }
22
  pid = fork ();
23
  while ((pid != 0) && (maxbytes > 1024 * 1024 * 1024))
24
    {
25
      maxbytes = maxbytes - (1024 * 1024 * 1024);
26
      pid = fork ();
27
      if (pid != 0)
28
        pid_cntr++;
29
      pid_list[i] = pid;
30
    }
31
  while ((pid_count < pid_cntr))
32
    {
33
    }
34
  kill (pid_list[i], 9);
35
}
36
 

powered by: WebSVN 2.1.0

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