Home
last modified time | relevance | path

Searched refs:i32 (Results 1 – 25 of 45) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/driver/timers/rtc/
Drtc.rs9 pub second: i32,
10 pub minute: i32,
11 pub hour: i32,
12 pub day: i32,
13 pub month: i32,
14 pub year: i32,
35 pub fn get(&mut self) -> Result<i32, SystemError> { in get() argument
53 self.year = read_cmos(CMOSTimeSelector::Year as u8) as i32; in get()
54 self.month = read_cmos(CMOSTimeSelector::Month as u8) as i32; in get()
55 self.day = read_cmos(CMOSTimeSelector::Day as u8) as i32; in get()
[all …]
/DragonOS-0.1.8/kernel/src/time/
Dtimeconv.rs16 tm_sec: i32,
17 tm_min: i32,
18 tm_hour: i32,
19 tm_mday: i32,
20 tm_mon: i32,
21 tm_wday: i32,
22 tm_yday: i32,
23 tm_year: i32,
85 pub fn time_to_calendar(totalsecs: PosixTimeT, offset: i32) -> CalendarTime { in time_to_calendar()
103 result.tm_hour = (rem / SECS_PER_HOUR) as i32; in time_to_calendar()
[all …]
Dtimekeeping.rs43 shift: i32,
57 ntp_error_shift: i32,
125 timekeeper.shift = clock_data.shift as i32; in timekeeper_setup_internals()
128 timekeeper.ntp_error_shift = (NTP_SCALE_SHIFT - clock_data.shift) as i32; in timekeeper_setup_internals()
199 tv_usec: (tp.tv_nsec / 1000) as i32, in do_gettimeofday()
Dclocksource.rs182 fn enable(&self) -> Result<i32, SystemError> { in enable() argument
269 pub fn register(&self) -> Result<i32, SystemError> { in register() argument
313 pub fn clocksource_enqueue_watchdog(&self) -> Result<i32, SystemError> { in clocksource_enqueue_watchdog() argument
373 pub fn set_unstable(&self, delta: i64) -> Result<i32, SystemError> { in set_unstable() argument
529 fn clocksource_change_rating(&self, rating: i32) { in clocksource_change_rating() argument
549 pub rating: i32,
562 rating: i32, in new() argument
585 pub fn set_rating(&mut self, rating: i32) { in set_rating() argument
847 pub extern "C" fn rs_clocksource_watchdog_kthread(_data: c_void) -> i32 { in rs_clocksource_watchdog_kthread() argument
/DragonOS-0.1.8/kernel/src/libs/
Dlockref.rs12 pub count: i32,
19 count: i32,
50 fn cmpxchg_loop(&mut self, mode: CmpxchgMode) -> Result<i32, i32> { in cmpxchg_loop() argument
120 fn cmpxchg_loop(&mut self, mode: CmpxchgMode) -> Result<i32, i32> { in cmpxchg_loop() argument
144 pub fn inc_not_zero(&mut self) -> Result<i32, SystemError> { in inc_not_zero() argument
172 pub fn inc_not_dead(&mut self) -> Result<i32, SystemError> { in inc_not_dead() argument
202 pub fn dec(&mut self) -> Result<i32, SystemError> { in dec() argument
209 let retval: Result<i32, SystemError>; in dec()
234 pub fn dec_return(&mut self) -> Result<i32, SystemError> { in dec_return() argument
262 pub fn dec_not_zero(&mut self) -> Result<i32, SystemError> { in dec_not_zero() argument
[all …]
Dnotifier.rs12 fn notifier_call(&self, action: u64, data: Option<&T>) -> i32; in notifier_call() argument
14 fn priority(&self) -> i32; in priority() argument
83 ) -> (i32, usize) { in call_chain() argument
84 let mut ret: i32 = 0; in call_chain()
129 ) -> (i32, usize) { in call_chain() argument
167 ) -> (i32, usize) { in call_chain() argument
194 ) -> (i32, usize) { in call_chain() argument
Dsemaphore.rs21 fn new(counter: i32) -> Result<Self, SystemError> { in new()
/DragonOS-0.1.8/kernel/src/ipc/
Dsignal_types.rs31 pub const MAX_SIG_NUM: i32 = 64;
33 pub const _NSIG_U64_CNT: i32 = MAX_SIG_NUM / 64;
167 pub si_signo: i32,
168 pub si_code: i32,
169 pub si_errno: i32,
194 pub fn new(sig: SignalNumber, _si_errno: i32, _si_code: si_code_val) -> Self { in new() argument
198 si_signo: sig as i32, in new()
199 si_code: _si_code as i32, in new()
260 #[repr(i32)]
281 pub fn from_i32(x: i32) -> si_code_val { in from_i32()
[all …]
Dpipe.rs27 valid_cnt: i32,
28 read_pos: i32,
29 write_pos: i32,
125 inode.read_pos = (inode.read_pos + num as i32) % PIPE_BUFF_SIZE as i32; in read_at()
126 inode.valid_cnt -= num as i32; in read_at()
196 inode.write_pos = (inode.write_pos + len as i32) % PIPE_BUFF_SIZE as i32; in write_at()
197 inode.valid_cnt += len as i32; in write_at()
Dsignal.rs71 ) -> Result<i32, SystemError> { in signal_kill_something_info() argument
86 ) -> Result<i32, SystemError> { in signal_kill_proc_info() argument
111 return if (sig as i32) <= MAX_SIG_NUM { in verify_signal()
126 ) -> Result<i32, SystemError> { in signal_send_sig_info() argument
193 ) -> Result<i32, SystemError> { in send_signal_locked() argument
201 == (si_code_val::SI_KERNEL as i32); in send_signal_locked()
223 ) -> Result<i32, SystemError> { in __send_signal_locked() argument
410 sig_number as i32, in do_signal()
417 sig_number as i32, in do_signal()
473 sig_number as i32, in get_signal_to_deliver()
[all …]
Dsyscall.rs30 pub fn pipe(fd: &mut [i32]) -> Result<usize, SystemError> { in pipe()
56 si_signo: sig as i32, in kill()
57 si_code: si_code_val::SI_USER as i32, in kill()
152 let sig = SignalNumber::from(sig as i32); in sigaction()
/DragonOS-0.1.8/docs/kernel/locking/
Dlockref.md19 pub count: i32,
26 count: i32,
62 - `pub fn inc_not_zero(&mut self) -> Result<i32, SystemError>`
63 - `pub fn inc_not_dead(&mut self) -> Result<i32, SystemError>`
102 - `pub fn dec(&mut self) -> Result<i32, SystemError>`
103 - `pub fn dec_return(&mut self) -> Result<i32, SystemError>`
104 - `pub fn dec_not_zero(&mut self) -> Result<i32, SystemError>`
105 - `pub fn dec_or_lock_not_zero(&mut self) -> Result<i32, SystemError>`
Dmutex.md54 let x :Mutex<Vec<i32>>= Mutex::new(Vec::new());
56 let mut g :MutexGuard<Vec<i32>>= x.lock();
120 pub fn try_lock(&self) -> Result<MutexGuard<T>, i32>
Dspinlock.md60 let x :SpinLock<Vec<i32>>= SpinLock::new(Vec::new());
62 let mut g :SpinLockGuard<Vec<i32>>= x.lock();
/DragonOS-0.1.8/kernel/src/process/
Dc_adapter.rs28 pub extern "C" fn process_init_files() -> i32 { in process_init_files()
38 pub extern "C" fn rs_drop_address_space(pcb: &'static mut process_control_block) -> i32 { in rs_drop_address_space() argument
53 ) -> i32 { in process_copy_files() argument
68 pub extern "C" fn process_exit_files(pcb: &'static mut process_control_block) -> i32 { in process_exit_files() argument
108 pub extern "C" fn rs_init_stdio() -> i32 { in rs_init_stdio()
Dprocess.rs52 _wake_flags: i32, in process_try_to_wake_up() argument
189 pub fn alloc_fd(&mut self, file: File, fd: Option<i32>) -> Result<i32, SystemError> { in alloc_fd() argument
235 pub fn get_file_mut_by_fd(&self, fd: i32) -> Option<&mut File> { in get_file_mut_by_fd()
249 pub fn get_file_ref_by_fd(&self, fd: i32) -> Option<&File> { in get_file_ref_by_fd()
260 pub fn drop_fd(&self, fd: i32) -> Result<(), SystemError> { in drop_fd()
304 pub fn get_socket(&self, fd: i32) -> Option<Arc<SocketInode>> { in get_socket()
/DragonOS-0.1.8/docs/community/code_contribution/
Drust-coding-style.md21 fn foo() -> i32 {
26 fn foo() -> i32 {
56 &emsp;&emsp;**TODO**: 将原有的使用i32作为错误码的代码,改为使用`SystemError`。
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dsyscall.rs73 uid: i32,
75 gid: i32,
196 return current_pcb().drop_fd(fd as i32).map(|_| 0); in close()
206 pub fn read(fd: i32, buf: &mut [u8]) -> Result<usize, SystemError> { in read() argument
224 pub fn write(fd: i32, buf: &[u8]) -> Result<usize, SystemError> { in write() argument
242 pub fn lseek(fd: i32, seek: SeekFrom) -> Result<usize, SystemError> { in lseek() argument
308 pub fn getdents(fd: i32, buf: &mut [u8]) -> Result<usize, SystemError> { in getdents() argument
346 pub fn unlinkat(_dirfd: i32, pathname: &str, flags: u32) -> Result<usize, SystemError> { in unlinkat() argument
377 pub fn dup(oldfd: i32) -> Result<usize, SystemError> { in dup()
412 pub fn dup2(oldfd: i32, newfd: i32) -> Result<usize, SystemError> { in dup2() argument
[all …]
/DragonOS-0.1.8/kernel/src/net/
Dsyscall.rs81 .get_socket(fd as i32) in setsockopt()
107 .get_socket(fd as i32) in getsockopt()
112 let optname = PosixSocketOption::try_from(optname as i32) in getsockopt()
148 let optname = PosixTcpSocketOptions::try_from(optname as i32) in getsockopt()
170 .get_socket(fd as i32) in connect()
188 .get_socket(fd as i32) in bind()
218 .get_socket(fd as i32) in sendto()
241 .get_socket(fd as i32) in recvfrom()
272 .get_socket(fd as i32) in recvmsg()
301 .get_socket(fd as i32) in listen()
[all …]
Dmod.rs40 impl TryFrom<i32> for ShutdownType {
43 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from()
49 impl Into<i32> for ShutdownType {
50 fn into(self) -> i32 { in into() argument
/DragonOS-0.1.8/kernel/src/arch/x86_64/asm/
Dbitops.rs9 pub fn ffz(x: u64) -> i32 { in ffz() argument
/DragonOS-0.1.8/docs/kernel/sched/
Dkernel_timer.md142 example_parameter: i32,
145 pub fn new(para: i32) -> Box<TimerExample> {
159 fn example_func(para: i32) {
/DragonOS-0.1.8/kernel/src/syscall/
Dmod.rs30 #[repr(i32)]
301 pub fn from_posix_errno(errno: i32) -> Option<SystemError> { in from_posix_errno()
310 pub fn to_posix_errno(&self) -> i32 { in to_posix_errno() argument
387 pub extern "C" fn syscall_init() -> i32 { in syscall_init()
433 let fd = args[0] as i32; in handle()
452 let fd = args[0] as i32; in handle()
474 let fd = args[0] as i32; in handle()
543 let fd = args[0] as i32; in handle()
669 let dirfd = args[0] as i32; in handle()
720 let oldfd: i32 = args[0] as c_int; in handle()
[all …]
/DragonOS-0.1.8/docs/kernel/core_api/
Dcasting.md23 pub fn from_posix_errno(errno: i32) -> Option<SystemError> {
32 pub fn to_posix_errno(&self) -> i32 {
/DragonOS-0.1.8/kernel/src/driver/uart/
Duart.rs21 const UART_SUCCESS: i32 = 0;
22 const E_UART_BITS_RATE_ERROR: i32 = 1;
23 const E_UART_SERIAL_FAULT: i32 = 2;
279 pub fn uart_init(uart_port: &UartPort, baud_rate: u32) -> Result<i32, &'static str> { in uart_init() argument
409 pub extern "C" fn c_uart_init(port: u16, baud_rate: u32) -> i32 { in c_uart_init() argument

12