replay: internal functions for replay log
[qemu/ar7.git] / replay / replay-internal.h
blob17600deff99ef1c3131d9218753a537739c63ab9
1 #ifndef REPLAY_INTERNAL_H
2 #define REPLAY_INTERNAL_H
4 /*
5 * replay-internal.h
7 * Copyright (c) 2010-2015 Institute for System Programming
8 * of the Russian Academy of Sciences.
10 * This work is licensed under the terms of the GNU GPL, version 2 or later.
11 * See the COPYING file in the top-level directory.
15 #include <stdio.h>
17 extern unsigned int replay_data_kind;
19 /* File for replay writing */
20 extern FILE *replay_file;
22 void replay_put_byte(uint8_t byte);
23 void replay_put_event(uint8_t event);
24 void replay_put_word(uint16_t word);
25 void replay_put_dword(uint32_t dword);
26 void replay_put_qword(int64_t qword);
27 void replay_put_array(const uint8_t *buf, size_t size);
29 uint8_t replay_get_byte(void);
30 uint16_t replay_get_word(void);
31 uint32_t replay_get_dword(void);
32 int64_t replay_get_qword(void);
33 void replay_get_array(uint8_t *buf, size_t *size);
34 void replay_get_array_alloc(uint8_t **buf, size_t *size);
36 /*! Checks error status of the file. */
37 void replay_check_error(void);
39 /*! Finishes processing of the replayed event and fetches
40 the next event from the log. */
41 void replay_finish_event(void);
42 /*! Reads data type from the file and stores it in the
43 replay_data_kind variable. */
44 void replay_fetch_data_kind(void);
46 #endif