]>
Commit | Line | Data |
---|---|---|
c92079f4 PD |
1 | #ifndef REPLAY_INTERNAL_H |
2 | #define REPLAY_INTERNAL_H | |
3 | ||
4 | /* | |
5 | * replay-internal.h | |
6 | * | |
7 | * Copyright (c) 2010-2015 Institute for System Programming | |
8 | * of the Russian Academy of Sciences. | |
9 | * | |
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. | |
12 | * | |
13 | */ | |
14 | ||
15 | #include <stdio.h> | |
16 | ||
17 | extern unsigned int replay_data_kind; | |
18 | ||
19 | /* File for replay writing */ | |
20 | extern FILE *replay_file; | |
21 | ||
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); | |
28 | ||
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); | |
35 | ||
c16861ef PD |
36 | /* Mutex functions for protecting replay log file */ |
37 | ||
38 | void replay_mutex_init(void); | |
39 | void replay_mutex_destroy(void); | |
40 | void replay_mutex_lock(void); | |
41 | void replay_mutex_unlock(void); | |
42 | ||
c92079f4 PD |
43 | /*! Checks error status of the file. */ |
44 | void replay_check_error(void); | |
45 | ||
46 | /*! Finishes processing of the replayed event and fetches | |
47 | the next event from the log. */ | |
48 | void replay_finish_event(void); | |
49 | /*! Reads data type from the file and stores it in the | |
50 | replay_data_kind variable. */ | |
51 | void replay_fetch_data_kind(void); | |
52 | ||
53 | #endif |