1 /* This used to ICE due to a backend problem on s390. */
3 /* { dg-do compile { target s390*-*-* } } */
4 /* { dg-options "-O1 -mpacked-stack" } */
6 typedef unsigned int __u32
;
10 } __attribute__ ((aligned (4))) atomic_t
;
11 static __inline__
__attribute__ ((always_inline
))
12 void atomic_inc (volatile atomic_t
* v
)
16 typeof (v
->counter
) old_val
, new_val
;
17 __asm__
__volatile__ (
23 "=&d" (old_val
), "=&d" (new_val
), "=m" (((atomic_t
*) (v
))->counter
):
24 "a" (v
), "d" (1), "m" (((atomic_t
*) (v
))->counter
):
28 extern unsigned long volatile __attribute__ ((section (".data"))) jiffies
;
34 static volatile int peer_total
;
35 int inet_peer_threshold
= 65536 + 128;
36 int inet_peer_minttl
= 120 * 100;
37 int inet_peer_maxttl
= 10 * 60 * 100;
39 cleanup_once (unsigned long ttl
)
42 if (p
!= ((void *) 0))
47 ) && ((long) (jiffies
) - (long) (p
->dtime
+ ttl
) < 0)))
51 atomic_inc (&p
->refcnt
);
55 inet_getpeer (__u32 daddr
, int create
)
59 if (peer_total
>= inet_peer_threshold
)
60 ttl
= inet_peer_minttl
;
63 inet_peer_maxttl
- (inet_peer_maxttl
-
64 inet_peer_minttl
) / 100 * peer_total
/
65 inet_peer_threshold
* 100;
66 for (i
= 0; i
< 30 && !cleanup_once (ttl
); i
++);