You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sched.rs
    path of file: ./repos/rudroid/code/src/core/android/syscalls
    
    the code of the file until where you have to start completion: use crate::core::android::fs::fserrors;
use crate::core::rudroid::Emulator;

impl<D> Emulator<D> {
    pub fn sys_sched_getscheduler(&m
    
    pub fn sys_sched_getscheduler(&mut self) {
        // sys_sched_getscheduler(pid_t pid);
        let pid = self.get_arg(0) as u32;
        let pid_s = pid as i32;

        if pid_s < 0 {
            self.set_return_val(fserrors::EINVAL as u64);
            return;
        }

        let res = unsafe { libc::sched_getscheduler(pid_s) };
        self.set_return_val(res as u64);
        self.debug_print(format!("sys_sched_getscheduler: {:} = {:}", pid, res));
    }