| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fgnu89-inline" } */ |
| 3 |
|
| 4 |
typedef struct { } spinlock_t; |
| 5 |
struct list_head { |
| 6 |
struct list_head *next, *prev; |
| 7 |
}; |
| 8 |
struct __wait_queue_head { |
| 9 |
spinlock_t lock; |
| 10 |
struct list_head task_list; |
| 11 |
}; |
| 12 |
typedef struct __wait_queue_head wait_queue_head_t; |
| 13 |
static inline void init_waitqueue_head(wait_queue_head_t *q) |
| 14 |
{ |
| 15 |
q->lock = (spinlock_t) { }; |
| 16 |
do { (&q->task_list)->next = (&q->task_list); (&q->task_list)->prev = (&q->task_list); } while (0); |
| 17 |
} |
| 18 |
struct timer_list { |
| 19 |
void (*function)(unsigned long); |
| 20 |
}; |
| 21 |
struct rpc_task { |
| 22 |
struct timer_list tk_timer; |
| 23 |
wait_queue_head_t tk_wait; |
| 24 |
}; |
| 25 |
static void |
| 26 |
rpc_run_timer(struct rpc_task *task) |
| 27 |
{ |
| 28 |
} |
| 29 |
inline void |
| 30 |
rpc_init_task(struct rpc_task *task) |
| 31 |
{ |
| 32 |
task->tk_timer.function = (void (*)(unsigned long)) rpc_run_timer; |
| 33 |
init_waitqueue_head(&task->tk_wait); |
| 34 |
} |
| 35 |
|