etsec: Flush queue when rx buffer is consumed
[qemu.git] / scripts / tracetool / format / h.py
blob9b3943002c52d2988123ab6910c50a3f0a3f02b5
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 """
5 trace/generated-tracers.h
6 """
8 __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
9 __copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
10 __license__ = "GPL version 2 or (at your option) any later version"
12 __maintainer__ = "Stefan Hajnoczi"
13 __email__ = "stefanha@linux.vnet.ibm.com"
16 from tracetool import out
19 def generate(events, backend):
20 out('/* This file is autogenerated by tracetool, do not edit. */',
21 '',
22 '#ifndef TRACE__GENERATED_TRACERS_H',
23 '#define TRACE__GENERATED_TRACERS_H',
24 '',
25 '#include "qemu-common.h"',
26 '')
28 backend.generate_begin(events)
30 for e in events:
31 out('',
32 'static inline void %(api)s(%(args)s)',
33 '{',
34 api=e.api(),
35 args=e.args)
37 if "disable" not in e.properties:
38 backend.generate(e)
40 out('}')
42 backend.generate_end(events)
44 out('#endif /* TRACE__GENERATED_TRACERS_H */')