diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index 46663af51..17272e802 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -22,6 +22,7 @@ #include #include #include +#include #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; diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 134b778b2..8a02b65da 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -18,6 +18,7 @@ #include #include #include +#include #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; diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index b31100596..e5e824400 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -22,6 +22,7 @@ #include #include #include +#include #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;