Coverage Report

Created: 2017-10-25 09:10

/root/src/xen/xen/include/xen/event_fifo.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * FIFO-based event channel ABI.
3
 *
4
 * Copyright (C) 2013 Citrix Systems R&D Ltd.
5
 *
6
 * This source code is licensed under the GNU General Public License,
7
 * Version 2 or later.  See the file COPYING for more details.
8
 */
9
#ifndef __XEN_EVENT_FIFO_H__
10
#define __XEN_EVENT_FIFO_H__
11
12
struct evtchn_fifo_queue {
13
    uint32_t *head; /* points into control block */
14
    uint32_t tail;
15
    uint8_t priority;
16
    spinlock_t lock;
17
};
18
19
struct evtchn_fifo_vcpu {
20
    struct evtchn_fifo_control_block *control_block;
21
    struct evtchn_fifo_queue queue[EVTCHN_FIFO_MAX_QUEUES];
22
};
23
24
0
#define EVTCHN_FIFO_EVENT_WORDS_PER_PAGE (PAGE_SIZE / sizeof(event_word_t))
25
#define EVTCHN_FIFO_MAX_EVENT_ARRAY_PAGES \
26
0
    (EVTCHN_FIFO_NR_CHANNELS / EVTCHN_FIFO_EVENT_WORDS_PER_PAGE)
27
28
struct evtchn_fifo_domain {
29
    event_word_t *event_array[EVTCHN_FIFO_MAX_EVENT_ARRAY_PAGES];
30
    unsigned int num_evtchns;
31
};
32
33
int evtchn_fifo_init_control(struct evtchn_init_control *init_control);
34
int evtchn_fifo_expand_array(const struct evtchn_expand_array *expand_array);
35
void evtchn_fifo_destroy(struct domain *domain);
36
37
#endif /* __XEN_EVENT_FIFO_H__ */
38
39
/*
40
 * Local variables:
41
 * mode: C
42
 * c-file-style: "BSD"
43
 * c-basic-offset: 4
44
 * tab-width: 4
45
 * indent-tabs-mode: nil
46
 * End:
47
 */