[MEMORY] Copy and write between memory spaces

This commit is contained in:
thomas committed 2017-03-27 23:09:08 +02:00
1 parent 5ca2b6994a
commit 8b2e58b6b1
3 files changed
+51 -5

No files matched your search

+3 -5
View File
@@ -9,11 +9,6 @@
void thread_function()
{
char *str = (char *)0x10000;
str[0] = (char)((unsigned int)'0' + get_current_process()->pid);
str[1] = (char)((unsigned int)'0' + get_current_thread()->tid);
str[3] = '-';
str[2] = '\0';
while(1)
{
debug((char *)0x10000);
@@ -49,6 +44,9 @@ int kmain(uint64_t multiboot_magic, void *multiboot_data)
vmm_set_page(p1->P4, 0x10000, pmm_alloc(), PAGE_PRESENT | PAGE_WRITE);
vmm_set_page(p2->P4, 0x10000, pmm_alloc(), PAGE_PRESENT | PAGE_WRITE);
vmm_p4_memcpy(p1->P4, (void *)0x10000, 0, "Hello, 1", 9);
vmm_p4_memcpy(p2->P4, (void *)0x10000, 0, "Hello, 2", 9);
scheduler_insert(t1);
scheduler_insert(t2);
scheduler_insert(t3);