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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr44807.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
 
3
struct jobstats
4
{
5
  int j_jobslots;
6
};
7
struct jobstats js;
8
int *jobs;
9
 
10
typedef int sh_job_map_func_t (int *, int, int, int);
11
 
12
static void
13
map_over_jobs (sh_job_map_func_t func)
14
{
15
  int i;
16
  int set, oset;
17
  if (js.j_jobslots)
18
    return;
19
  sigemptyset (&set);
20
  sigaddset (set, 17);
21
  sigemptyset (&oset);
22
  sigprocmask (0, set, oset);
23
  for (i = 0; js.j_jobslots; i++)
24
    if (jobs[i])
25
      func (jobs, 0, 0, 0);
26
  sigprocmask (oset, ((void *) 0));
27
}
28
 
29
int
30
print_job (int *job, int format, int state, int job_index)
31
{
32
  map_over_jobs (print_job);
33
}
34
 
35
void
36
list_running_jobs (void)
37
{
38
  map_over_jobs (print_job);
39
}
40
 

powered by: WebSVN 2.1.0

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