diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-07 11:24:06 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-07 11:24:06 +0100 |
commit | 26b68c108664cb54089613bdbc54624ed66f7fda (patch) | |
tree | cafbab0b0c9c1db1869e4346cebc96b2d6f53570 /kernel/include/paging.h | |
parent | acc786cb5805d057932ada3e7c571bb8e901cd67 (diff) | |
download | kogata-26b68c108664cb54089613bdbc54624ed66f7fda.tar.gz kogata-26b68c108664cb54089613bdbc54624ed66f7fda.zip |
Make L0 thread-safe (mostly).
Diffstat (limited to 'kernel/include/paging.h')
-rw-r--r-- | kernel/include/paging.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/include/paging.h b/kernel/include/paging.h index 720d6b3..44014a2 100644 --- a/kernel/include/paging.h +++ b/kernel/include/paging.h @@ -19,6 +19,12 @@ uint32_t pd_get_frame(void* vaddr); // get physical frame for virtual address int pd_map_page(void* vaddr, uint32_t frame_id, bool rw); // returns nonzero on error void pd_unmap_page(void* vaddr); // does nothing if page not mapped +// Note on concurrency : we expect that multiple threads will not try to map/unmap +// pages in the same region at the same time. It can nevertheless happen that +// several threads try to map pages that belong to the same 4M-section, and in that +// case both might require the allocation of a new PT at the same location. These +// cases are well-handled (the pagedir_t type contains a mutex used for this) + pagedir_t *create_pagedir(); // returns zero on error void delete_pagedir(pagedir_t *pd); |