X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fpte.h;h=1660727108385418a2cf07edba939f2a77ed9399;hb=fd2a5afa946474ba0839de0e9da238dbaecbd6a5;hp=74a52f44815534d05873984ed6cc7320eac7f6ba;hpb=f415a37905c57f61b444806bf84f5405184452aa;p=pintos-anon diff --git a/src/threads/pte.h b/src/threads/pte.h index 74a52f4..1660727 100644 --- a/src/threads/pte.h +++ b/src/threads/pte.h @@ -84,7 +84,7 @@ static inline uint32_t *pde_get_pt (uint32_t pde) { The PTE's page is readable. If WRITABLE is true then it will be writable as well. The page will be usable only by ring 0 code (the kernel). */ -static inline uint32_t pte_create_kernel (uint32_t *page, bool writable) { +static inline uint32_t pte_create_kernel (void *page, bool writable) { ASSERT (pg_ofs (page) == 0); return vtop (page) | PTE_P | (writable ? PTE_W : 0); } @@ -93,7 +93,7 @@ static inline uint32_t pte_create_kernel (uint32_t *page, bool writable) { The PTE's page is readable. If WRITABLE is true then it will be writable as well. The page will be usable by both user and kernel code. */ -static inline uint32_t pte_create_user (uint32_t *page, bool writable) { +static inline uint32_t pte_create_user (void *page, bool writable) { return pte_create_kernel (page, writable) | PTE_U; }