1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2025-02-17 19:19:16 +01:00

sdvxio: Add atomics to kfca/bio2

This commit is contained in:
Will Xyen 2020-08-16 20:58:12 -07:00
parent f1700ca551
commit 3a1005f1f8
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,4 @@
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@ -31,8 +32,8 @@ static uint16_t sdvx_io_analog[2];
static char autodetect_buffer[512];
static bool running;
static bool processing_io;
static atomic_bool running;
static atomic_bool processing_io;
static int16_t bio2_node_id;
uint8_t wing_staging[12];

View File

@ -1,3 +1,4 @@
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@ -29,8 +30,8 @@ static uint16_t sdvx_io_gpio[2];
static uint8_t sdvx_io_gpio_sys;
static uint16_t sdvx_io_analog[2];
static bool running;
static bool processing_io;
static atomic_bool running;
static atomic_bool processing_io;
static int16_t kfca_node_id;
struct ac_io_kfca_poll_out pout_staging;
@ -129,6 +130,8 @@ void sdvx_io_fini(void)
{
running = false;
while (processing_io) {
// avoid banging
Sleep(1);
}
}