mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-02-15 15:31:31 +00:00
ppcemu: Make flags atomic.
For flags that might be accessed by other threads.
This commit is contained in:
parent
4ef3c792de
commit
1d5502dc3c
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
DingusPPC - The Experimental PowerPC Macintosh emulator
|
DingusPPC - The Experimental PowerPC Macintosh emulator
|
||||||
Copyright (C) 2018-23 divingkatae and maximum
|
Copyright (C) 2018-24 divingkatae and maximum
|
||||||
(theweirdo) spatium
|
(theweirdo) spatium
|
||||||
|
|
||||||
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
||||||
@ -298,7 +298,11 @@ enum Exc_Cause : uint32_t {
|
|||||||
TRAP = 1 << (31 - 14),
|
TRAP = 1 << (31 - 14),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef EXEC_FLAGS_ATOMIC
|
||||||
|
extern std::atomic<unsigned> exec_flags;
|
||||||
|
#else
|
||||||
extern unsigned exec_flags;
|
extern unsigned exec_flags;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern jmp_buf exc_env;
|
extern jmp_buf exc_env;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
DingusPPC - The Experimental PowerPC Macintosh emulator
|
DingusPPC - The Experimental PowerPC Macintosh emulator
|
||||||
Copyright (C) 2018-21 divingkatae and maximum
|
Copyright (C) 2018-24 divingkatae and maximum
|
||||||
(theweirdo) spatium
|
(theweirdo) spatium
|
||||||
|
|
||||||
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
||||||
@ -54,7 +54,11 @@ uint32_t ppc_cur_instruction; // Current instruction for the PPC
|
|||||||
uint32_t ppc_effective_address;
|
uint32_t ppc_effective_address;
|
||||||
uint32_t ppc_next_instruction_address; // Used for branching, setting up the NIA
|
uint32_t ppc_next_instruction_address; // Used for branching, setting up the NIA
|
||||||
|
|
||||||
unsigned exec_flags; // execution control flags
|
#ifdef EXEC_FLAGS_ATOMIC
|
||||||
|
std::atomic<unsigned> exec_flags{0}; // execution control flags
|
||||||
|
#else
|
||||||
|
unsigned exec_flags; // FIXME: read by main thread ppc_main_opcode; written by audio dbdma DMAChannel::update_irq .. add_immediate_timer
|
||||||
|
#endif
|
||||||
bool int_pin = false; // interrupt request pin state: true - asserted
|
bool int_pin = false; // interrupt request pin state: true - asserted
|
||||||
bool dec_exception_pending = false;
|
bool dec_exception_pending = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user