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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr32482.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t;
2
static inline __attribute__((always_inline))
3
int bitmap_empty(const unsigned long *src, int nbits)
4
{
5
  return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
6
}
7
static inline __attribute__((always_inline))
8
int __nodes_empty(const nodemask_t *srcp, int nbits)
9
{
10
 return bitmap_empty(srcp->bits, nbits);
11
}
12
extern nodemask_t node_online_map;
13
void drain_array(void);
14
void drain_cpu_caches(void)
15
{
16
 int node;
17
 if (!__nodes_empty(&(node_online_map), (1 << 0)))
18
     for (((node)) = 0; ((node)) < 1; ((node))++)
19
     {
20
     }
21
 if (!__nodes_empty(&(node_online_map), (1 << 0)))
22
     drain_array();
23
}

powered by: WebSVN 2.1.0

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