video: Make the rest of the FIFO variables atomic
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <stdatomic.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
@@ -215,7 +216,7 @@ typedef struct mach64_t {
|
||||
} accel;
|
||||
|
||||
fifo_entry_t fifo[FIFO_SIZE];
|
||||
volatile int fifo_read_idx, fifo_write_idx;
|
||||
atomic_int fifo_read_idx, fifo_write_idx;
|
||||
|
||||
thread_t *fifo_thread;
|
||||
event_t *wake_fifo_thread;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <stdatomic.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
@@ -429,7 +430,7 @@ typedef struct mystique_t {
|
||||
xzoomctrl,
|
||||
pixel_count, trap_count;
|
||||
|
||||
volatile int busy, blitter_submit_refcount,
|
||||
atomic_int busy, blitter_submit_refcount,
|
||||
blitter_submit_dma_refcount, blitter_complete_refcount,
|
||||
endprdmasts_pending, softrap_pending,
|
||||
fifo_read_idx, fifo_write_idx;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <wchar.h>
|
||||
#include <stdatomic.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/io.h>
|
||||
@@ -298,7 +299,7 @@ typedef struct s3_t {
|
||||
int input;
|
||||
int len, start;
|
||||
int odf, idf, yuv;
|
||||
volatile int busy;
|
||||
atomic_int busy;
|
||||
} videoengine;
|
||||
|
||||
struct
|
||||
@@ -334,7 +335,7 @@ typedef struct s3_t {
|
||||
} streams;
|
||||
|
||||
fifo_entry_t fifo[FIFO_SIZE];
|
||||
volatile int fifo_read_idx, fifo_write_idx;
|
||||
atomic_int fifo_read_idx, fifo_write_idx;
|
||||
|
||||
uint8_t fifo_thread_run;
|
||||
|
||||
@@ -351,10 +352,10 @@ typedef struct s3_t {
|
||||
uint32_t hwc_fg_col, hwc_bg_col;
|
||||
int hwc_col_stack_pos;
|
||||
|
||||
int translate;
|
||||
int enable_8514;
|
||||
int color_16bit;
|
||||
volatile int busy, force_busy;
|
||||
int translate;
|
||||
int enable_8514;
|
||||
int color_16bit;
|
||||
atomic_int busy, force_busy;
|
||||
|
||||
uint8_t thread_run, serialport;
|
||||
void *i2c, *ddc;
|
||||
|
||||
Reference in New Issue
Block a user