rusty_mos::kernel::syscall_impl

Function sys_lock

Source
fn sys_lock(id: u32) -> u32
Expand description

SYSNO: 20, lock a specified memory pool.

Only the env which has been bind to the pool can lock it.

§Return

Ok(bool) means everything goes smooth.

  • Ok(true) or Ok(1) means this pool is successfully locked.
  • Ok(false) or Ok(0) means this pool has been locked.

§Failure

This syscall will return a negated-KError if the pool does not exist or the current env cannot lock it.

See Also: MemoryPool::lock