Skip to content

Commit 508ce24

Browse files
committed
Expose Z80::cycles as volatile through the Z80_WITH_VOLATILE_CYCLES configuration macro.
1 parent 5947ca6 commit 508ce24

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

API/Z80.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ typedef zuint8 (* Z80Illegal)(Z80 *cpu, zuint8 opcode);
160160
* in use. */
161161

162162
struct Z80 {
163-
164-
/** @brief Number of clock cycles already executed. */
165-
166-
zusize cycles;
163+
# if !defined(__DOXYGEN__) && defined(Z80_WITH_VOLATILE_CYCLES)
164+
volatile
165+
# endif
166+
zusize cycles; /**< @brief Number of clock cycles already executed. */
167167

168168
/** @brief Maximum number of clock cycles to be executed. */
169169

0 commit comments

Comments
 (0)