/[qemu]/qemu/exec.c
ViewVC logotype

Diff of /qemu/exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by bellard, Wed May 14 18:59:01 2003 UTC revision 1.3 by bellard, Wed May 14 21:51:13 2003 UTC
# Line 42  Line 42 
42  TranslationBlock tbs[CODE_GEN_MAX_BLOCKS];  TranslationBlock tbs[CODE_GEN_MAX_BLOCKS];
43  TranslationBlock *tb_hash[CODE_GEN_HASH_SIZE];  TranslationBlock *tb_hash[CODE_GEN_HASH_SIZE];
44  int nb_tbs;  int nb_tbs;
45    /* any access to the tbs or the page table must use this lock */
46    spinlock_t tb_lock = SPIN_LOCK_UNLOCKED;
47    
48  uint8_t code_gen_buffer[CODE_GEN_BUFFER_SIZE];  uint8_t code_gen_buffer[CODE_GEN_BUFFER_SIZE];
49  uint8_t *code_gen_ptr;  uint8_t *code_gen_ptr;
# Line 172  void page_set_flags(unsigned long start, Line 174  void page_set_flags(unsigned long start,
174      end = TARGET_PAGE_ALIGN(end);      end = TARGET_PAGE_ALIGN(end);
175      if (flags & PAGE_WRITE)      if (flags & PAGE_WRITE)
176          flags |= PAGE_WRITE_ORG;          flags |= PAGE_WRITE_ORG;
177        spin_lock(&tb_lock);
178      for(addr = start; addr < end; addr += TARGET_PAGE_SIZE) {      for(addr = start; addr < end; addr += TARGET_PAGE_SIZE) {
179          p = page_find_alloc(addr >> TARGET_PAGE_BITS);          p = page_find_alloc(addr >> TARGET_PAGE_BITS);
180          /* if the write protection is set, then we invalidate the code          /* if the write protection is set, then we invalidate the code
# Line 183  void page_set_flags(unsigned long start, Line 186  void page_set_flags(unsigned long start,
186          }          }
187          p->flags = flags;          p->flags = flags;
188      }      }
189        spin_unlock(&tb_lock);
190  }  }
191    
192  void cpu_x86_tblocks_init(void)  void cpu_x86_tblocks_init(void)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26