Skip to content

Commit 17bc970

Browse files
committed
chore(lab/4,5): wrong function name
1 parent f268810 commit 17bc970

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/labs/0x04/tasks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ pub fn exit(ret: isize, context: &mut ProcessContext) {
741741
x86_64::instructions::interrupts::without_interrupts(|| {
742742
let manager = get_process_manager();
743743
// FIXME: implement this for ProcessManager
744-
manager.kill_self(ret);
744+
manager.kill_current(ret);
745745
manager.switch_next(context);
746746
})
747747
}
@@ -752,8 +752,8 @@ pub fn exit(ret: isize, context: &mut ProcessContext) {
752752
退出的操作并不只用于当前进程,也可以作用于其他进程,因此可以通过如下方式将它们统一:
753753

754754
```rust
755-
pub fn kill_self(&self, ret: isize) {
756-
self.kill(processor::current_pid(), ret);
755+
pub fn kill_current(&self, ret: isize) {
756+
self.kill(processor::get_pid(), ret);
757757
}
758758

759759
pub fn kill(&self, pid: ProcessId, ret: isize) {

docs/labs/0x05/tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ pub fn wait_pid(pid: ProcessId, context: &mut ProcessContext) {
419419
pub fn wait_pid(&self, pid: ProcessId) {
420420
let mut wait_queue = self.wait_queue.lock();
421421
// FIXME: push the current process to the wait queue
422-
// `processor::current_pid()` is waiting for `pid`
422+
// `processor::get_pid()` is waiting for `pid`
423423
}
424424
```
425425

@@ -726,7 +726,7 @@ pub struct ProcessData {
726726
pub fn sem_wait(key: u32, context: &mut ProcessContext) {
727727
x86_64::instructions::interrupts::without_interrupts(|| {
728728
let manager = get_process_manager();
729-
let pid = processor::current_pid();
729+
let pid = processor::get_pid();
730730
let ret = manager.current().write().sem_wait(key, pid);
731731
match ret {
732732
SemaphoreResult::Ok => context.set_rax(0),

0 commit comments

Comments
 (0)