lock when changing process memory region (in syscall.c) and page-table (in process.c)

This commit is contained in:
Masamichi Takagi m-takagi@ab.jp.nec.com
2012-10-09 11:40:49 +09:00
parent 9a8449df2b
commit dd596a2a78
3 changed files with 17 additions and 2 deletions

View File

@@ -69,6 +69,14 @@ struct process_vm {
// Address space private futexes
struct futex_queue futex_queues[1 << FUTEX_HASHBITS];
aal_spinlock_t page_table_lock;
aal_spinlock_t memory_range_lock;
// to protect the followings:
// 1. addition of process "memory range" (extend_process_region, add_process_memory_range)
// 2. addition of process page table (allocate_pages, update_process_page_table)
// note that physical memory allocator (aal_mc_alloc_pages, aal_pagealloc_alloc)
// is protected by its own lock (see aal/manycore/generic/page_alloc.c)
};