OSDN Git Service

[VM][I8259][PC9801] Fix crash when changing V30 Sub CPU <-> i286/i386 Main CPU.
[csp-qt/common_source_project-fm7.git] / source / src / ringbuffer.h
1 /*
2         Skelton for retropc emulator
3
4         Author : Kyuma.Ohta <whatisthis.sowhat _at_ gmail.com>
5         Date   : 2019.04.11-
6
7         [ ring buffer ]
8 */
9
10 #pragma once
11
12 #include "fifo.h"
13
14 class DLL_PREFIX RINGBUFFER : public FIFO
15 {
16 public:
17         RINGBUFFER(int s, int empty_warn = -1, int fill_warn = -1);
18         virtual void write(int val, bool *p_fill_warn = nullptr);
19         virtual int read(bool *p_empty_warn = nullptr);
20         virtual int read_not_remove(int pt, bool *p_empty_warn = nullptr);
21         virtual void write_not_push(int pt, int d, bool *p_fill_warn = nullptr);
22 };