Merge branch 'master' of gitlab.ibr.cs.tu-bs.de:vss/teaching/ws25/v_bsb2/Gruppe_003
This commit is contained in:
@@ -256,7 +256,7 @@ int receive(Vault& v, void* buffer, size_t size) {
|
|||||||
if(total_len - (i*4096) > 4096)
|
if(total_len - (i*4096) > 4096)
|
||||||
copy_from_phys(v, paddr+offset, buffer, 4096-offset);
|
copy_from_phys(v, paddr+offset, buffer, 4096-offset);
|
||||||
else
|
else
|
||||||
copy_from_phys(v, paddr, buffer, total_len - (i*4096));
|
copy_from_phys(v, paddr, buffer, total_len - (i*4096)); //last page
|
||||||
}
|
}
|
||||||
|
|
||||||
return ipc->pid;
|
return ipc->pid;
|
||||||
@@ -276,8 +276,7 @@ bool reply(Vault& v, const void* buffer, size_t size) {
|
|||||||
Thread* other_thread = v.thread_list[ipc->pid];
|
Thread* other_thread = v.thread_list[ipc->pid];
|
||||||
if (other_thread == nullptr) return false;
|
if (other_thread == nullptr) return false;
|
||||||
|
|
||||||
uintptr_t phys_ptr = isMapped((uintptr_t)buffer, current_thread->paging_tree->l4 );
|
ipc->ptr = (uintptr_t)buffer;
|
||||||
ipc->ptr = phys_ptr + ((uintptr_t)buffer & 0xFFF);
|
|
||||||
ipc->size = size;
|
ipc->size = size;
|
||||||
ipc->pid = current_thread->id;
|
ipc->pid = current_thread->id;
|
||||||
ipc->is_answer = true;
|
ipc->is_answer = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user