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:
parent
eb99232432
commit
ed5471ff3d
@ -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
2
user
@ -1 +1 @@
|
||||
Subproject commit c62bccb6b1866c1faeb113e769786aaa4699434c
|
||||
Subproject commit 526d79955655663e9aee67f592777fb844fd331d
|
Loading…
Reference in New Issue
Block a user