Skip to content

Commit

Permalink
incCycles for all cores
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Feb 9, 2024
1 parent be4ab28 commit 95fdc14
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion native/dosbox
2 changes: 1 addition & 1 deletion native/dosbox-x
2 changes: 1 addition & 1 deletion native/jsdos/include/jsdos-asyncify.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace jsdos {
void asyncifyLock();
void asyncifyUnlock();
void destroyAsyncify();
void incCycles();
void incCycles(int32_t count);
uint32_t getAndResetCycles();
}

Expand Down
6 changes: 4 additions & 2 deletions native/jsdos/jsdos-asyncify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ namespace {
std::atomic_uint32_t cycles(0);
}

void jsdos::incCycles() {
::cycles++;
void jsdos::incCycles(int32_t count) {
if (count > 0) {
::cycles += count;
}
}

uint32_t jsdos::getAndResetCycles() {
Expand Down

0 comments on commit 95fdc14

Please sign in to comment.