fix typo of sys_semaphore_create

This commit is contained in:
Yu Chen 2021-12-11 21:11:10 +08:00
parent 4ad64e83f6
commit 90796450fe
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize {
SYSCALL_MUTEX_CREATE => sys_mutex_create(args[0] == 1),
SYSCALL_MUTEX_LOCK => sys_mutex_lock(args[0]),
SYSCALL_MUTEX_UNLOCK => sys_mutex_unlock(args[0]),
SYSCALL_SEMAPHORE_CREATE => sys_semaphore_creare(args[0]),
SYSCALL_SEMAPHORE_CREATE => sys_semaphore_create(args[0]),
SYSCALL_SEMAPHORE_UP => sys_semaphore_up(args[0]),
SYSCALL_SEMAPHORE_DOWN => sys_semaphore_down(args[0]),
_ => panic!("Unsupported syscall_id: {}", syscall_id),

View File

@ -53,7 +53,7 @@ pub fn sys_mutex_unlock(mutex_id: usize) -> isize {
0
}
pub fn sys_semaphore_creare(res_count: usize) -> isize {
pub fn sys_semaphore_create(res_count: usize) -> isize {
let process = current_process();
let mut process_inner = process.inner_exclusive_access();
let id = if let Some(id) = process_inner