Changed running block variable
Test if someone makes changes to currently running block Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1529
This commit is contained in:
parent
252cc94215
commit
3cb8910915
2 changed files with 4 additions and 2 deletions
|
@ -145,7 +145,6 @@ static void IllegalOption(void) {
|
|||
|
||||
static struct {
|
||||
Bitu callback;
|
||||
CacheBlock * lastblock;
|
||||
} core_dyn;
|
||||
|
||||
|
||||
|
@ -215,6 +214,7 @@ restart_core:
|
|||
findblock:;
|
||||
CacheBlock * block=chandler->FindCacheBlock(ip_point&4095);
|
||||
if (!block) {
|
||||
cache.block.running=0;
|
||||
block=CreateCacheBlock(ip_point,cpu.code.big,128);
|
||||
DYN_LOG("Created block size %x type %d",block->cache.size,block->type);
|
||||
chandler->AddCacheBlock(block);
|
||||
|
@ -251,7 +251,7 @@ run_block:
|
|||
if (temp_handler->flags & PFLAG_HASCODE) {
|
||||
block=temp_handler->FindCacheBlock(temp_ip & 4095);
|
||||
if (!block) goto restart_core;
|
||||
cache_linkblocks(core_dyn.lastblock,block,ret==BR_Link2);
|
||||
cache_linkblocks(cache.block.running,block,ret==BR_Link2);
|
||||
goto run_block;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ static struct {
|
|||
CacheBlock * first;
|
||||
CacheBlock * active;
|
||||
CacheBlock * free;
|
||||
CacheBlock * running;
|
||||
} block;
|
||||
Bit8u * pos;
|
||||
CacheBlock linkblocks[2];
|
||||
|
@ -61,6 +62,7 @@ public:
|
|||
for (Bitu i=block->page.first;i<=block->page.last;i++) write_map[i]--;
|
||||
block->code_page=0; //Else resetblock will do double work
|
||||
count--;
|
||||
if (block==cache.block.running) LOG_MSG("Writing to current block");
|
||||
cache_resetblock(block);
|
||||
*where=nextblock;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue