1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

support basic shm syscall & pass test.

This commit is contained in:
Hongbo Kang 2020-01-02 16:33:15 +08:00
parent eb99232432
commit ed5471ff3d
2 changed files with 5 additions and 4 deletions

View File

@ -102,7 +102,7 @@ impl Syscall<'_> {
"shmat",
);
shmIdentifier.addr = addr;
self.process().shmIdentifiers.set(id, shmIdentifier);
proc.shmIdentifiers.set(id, shmIdentifier);
//self.process().shmIdentifiers.setVirtAddr(id, addr);
return Ok(addr);
}
@ -111,9 +111,10 @@ impl Syscall<'_> {
info!(
"shmdt: addr={:#x}", addr
);
let optId = self.process().shmIdentifiers.getId(addr);
let mut proc = self.process();
let optId = proc.shmIdentifiers.getId(addr);
if let Some(id) = optId {
self.process().shmIdentifiers.pop(id);
proc.shmIdentifiers.pop(id);
}
Ok(0)
}

2
user

@ -1 +1 @@
Subproject commit c62bccb6b1866c1faeb113e769786aaa4699434c
Subproject commit 526d79955655663e9aee67f592777fb844fd331d