URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 325 |
Rev 384 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -m4" } */
|
/* { dg-options "-O2 -m4" } */
|
|
|
int pid_count = 0;
|
int pid_count = 0;
|
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
{
|
{
|
unsigned int c;
|
unsigned int c;
|
unsigned long long maxbytes = 0;
|
unsigned long long maxbytes = 0;
|
extern char *optarg;
|
extern char *optarg;
|
int i;
|
int i;
|
int pid_cntr;
|
int pid_cntr;
|
int pid;
|
int pid;
|
int pid_list[1000];
|
int pid_list[1000];
|
while ((c = getopt (argc, argv, "c:b:p:wvh")) != (-1))
|
while ((c = getopt (argc, argv, "c:b:p:wvh")) != (-1))
|
{
|
{
|
switch ((char) c)
|
switch ((char) c)
|
{
|
{
|
case 'b':
|
case 'b':
|
maxbytes = atoll (optarg);
|
maxbytes = atoll (optarg);
|
}
|
}
|
}
|
}
|
pid = fork ();
|
pid = fork ();
|
while ((pid != 0) && (maxbytes > 1024 * 1024 * 1024))
|
while ((pid != 0) && (maxbytes > 1024 * 1024 * 1024))
|
{
|
{
|
maxbytes = maxbytes - (1024 * 1024 * 1024);
|
maxbytes = maxbytes - (1024 * 1024 * 1024);
|
pid = fork ();
|
pid = fork ();
|
if (pid != 0)
|
if (pid != 0)
|
pid_cntr++;
|
pid_cntr++;
|
pid_list[i] = pid;
|
pid_list[i] = pid;
|
}
|
}
|
while ((pid_count < pid_cntr))
|
while ((pid_count < pid_cntr))
|
{
|
{
|
}
|
}
|
kill (pid_list[i], 9);
|
kill (pid_list[i], 9);
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.