mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 10:53:25 +00:00
Fix all spelling mistakes in history by typos tool
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b29d3b5409
commit
86f09eef75
@ -124,7 +124,7 @@ impl CloneFlags {
|
||||
/// Clone a child thread or child process.
|
||||
///
|
||||
/// FIXME: currently, the child process or thread will be scheduled to run at once,
|
||||
/// but this may not be the expected bahavior.
|
||||
/// but this may not be the expected behavior.
|
||||
pub fn clone_child(
|
||||
ctx: &Context,
|
||||
parent_context: &UserContext,
|
||||
@ -411,7 +411,7 @@ fn clone_sighand(
|
||||
parent_sig_dispositions: &Arc<Mutex<SigDispositions>>,
|
||||
clone_flags: CloneFlags,
|
||||
) -> Arc<Mutex<SigDispositions>> {
|
||||
// similer to CLONE_FILES
|
||||
// similar to CLONE_FILES
|
||||
if clone_flags.contains(CloneFlags::CLONE_SIGHAND) {
|
||||
parent_sig_dispositions.clone()
|
||||
} else {
|
||||
|
@ -49,7 +49,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets real user id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn ruid(&self) -> Uid {
|
||||
self.0.ruid()
|
||||
@ -57,7 +57,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets effective user id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn euid(&self) -> Uid {
|
||||
self.0.euid()
|
||||
@ -65,7 +65,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets saved-set user id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn suid(&self) -> Uid {
|
||||
self.0.suid()
|
||||
@ -73,7 +73,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets file system user id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn fsuid(&self) -> Uid {
|
||||
self.0.fsuid()
|
||||
@ -143,7 +143,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets real group id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn rgid(&self) -> Gid {
|
||||
self.0.rgid()
|
||||
@ -151,7 +151,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets effective group id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn egid(&self) -> Gid {
|
||||
self.0.egid()
|
||||
@ -159,7 +159,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets saved-set group id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn sgid(&self) -> Gid {
|
||||
self.0.sgid()
|
||||
@ -167,7 +167,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets file system group id.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn fsgid(&self) -> Gid {
|
||||
self.0.fsgid()
|
||||
@ -237,7 +237,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Acquires the read lock of supplementary group ids.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn groups(&self) -> RwLockReadGuard<BTreeSet<Gid>> {
|
||||
self.0.groups()
|
||||
@ -255,7 +255,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets the capabilities that child process can inherit.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn inheritable_capset(&self) -> CapSet {
|
||||
self.0.inheritable_capset()
|
||||
@ -263,7 +263,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets the capabilities that are permitted.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn permitted_capset(&self) -> CapSet {
|
||||
self.0.permitted_capset()
|
||||
@ -271,7 +271,7 @@ impl<R: TRights> Credentials<R> {
|
||||
|
||||
/// Gets the capabilities that actually use.
|
||||
///
|
||||
/// This method requies the `Read` right.
|
||||
/// This method requires the `Read` right.
|
||||
#[require(R > Read)]
|
||||
pub fn effective_capset(&self) -> CapSet {
|
||||
self.0.effective_capset()
|
||||
|
@ -33,7 +33,7 @@ pub struct RobustListHead {
|
||||
impl RobustListHead {
|
||||
/// Return an iterator for all futexes in the robust list.
|
||||
///
|
||||
/// The futex refered to by `list_op_pending`, if any, will be returned as
|
||||
/// The futex referred to by `list_op_pending`, if any, will be returned as
|
||||
/// the last item.
|
||||
pub fn futexes(&self) -> FutexIter<'_> {
|
||||
FutexIter::new(self)
|
||||
|
@ -7,7 +7,7 @@ use crate::{
|
||||
process::{process_table, Pgid, ProcessGroup},
|
||||
};
|
||||
|
||||
/// A termial is used to interact with system. A terminal can support the shell
|
||||
/// A terminal is used to interact with system. A terminal can support the shell
|
||||
/// job control.
|
||||
///
|
||||
/// We currently support two kinds of terminal, the tty and pty.
|
||||
|
@ -217,7 +217,7 @@ struct InitStackWriter {
|
||||
|
||||
impl InitStackWriter {
|
||||
fn write(mut self) -> Result<()> {
|
||||
// FIXME: Some OSes may put the first page of excutable file here
|
||||
// FIXME: Some OSes may put the first page of executable file here
|
||||
// for interpreting elf headers.
|
||||
|
||||
let argc = self.argv.len() as u64;
|
||||
@ -268,7 +268,7 @@ impl InitStackWriter {
|
||||
}
|
||||
|
||||
/// Libc ABI requires 16-byte alignment of the stack entrypoint.
|
||||
/// Current postion of the stack is 8-byte aligned already, insert 8 byte
|
||||
/// Current position of the stack is 8-byte aligned already, insert 8 byte
|
||||
/// to meet the requirement if necessary.
|
||||
fn adjust_stack_alignment(&self, envp_pointers: &[u64], argv_pointers: &[u64]) -> Result<()> {
|
||||
// Ensure 8-byte alignment
|
||||
@ -285,7 +285,7 @@ impl InitStackWriter {
|
||||
}
|
||||
|
||||
fn write_aux_vec(&self) -> Result<()> {
|
||||
// Write NULL auxilary
|
||||
// Write NULL auxiliary
|
||||
self.write_u64(0)?;
|
||||
self.write_u64(AuxKey::AT_NULL as u64)?;
|
||||
// Write Auxiliary vectors
|
||||
|
@ -16,7 +16,7 @@ use crate::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
/// Load an executable to root vmar, including loading programe image, preparing heap and stack,
|
||||
/// Load an executable to root vmar, including loading programme image, preparing heap and stack,
|
||||
/// initializing argv, envp and aux tables.
|
||||
/// About recursion_limit: recursion limit is used to limit th recursion depth of shebang executables.
|
||||
/// If the interpreter(the program behind #!) of shebang executable is also a shebang,
|
||||
|
@ -26,7 +26,7 @@ pub fn parse_shebang_line(file_header_buffer: &[u8]) -> Result<Option<Vec<CStrin
|
||||
if shebang_argv.len() != 1 {
|
||||
return_errno_with_message!(
|
||||
Errno::EINVAL,
|
||||
"One and only one intpreter program should be specified"
|
||||
"One and only one interpreter program should be specified"
|
||||
);
|
||||
}
|
||||
Ok(Some(shebang_argv))
|
||||
|
@ -239,7 +239,7 @@ impl Observer<IoEvents> for EventCounter {
|
||||
/// according to the events.
|
||||
///
|
||||
/// This trait is added instead of creating a new method in [`Pollee`] because sometimes we do not
|
||||
/// have access to the internal [`Pollee`], but there is a method that provides the same sematics
|
||||
/// have access to the internal [`Pollee`], but there is a method that provides the same semantics
|
||||
/// as [`Pollee::poll`] and we need to perform event-based operations using that method.
|
||||
pub trait Pollable {
|
||||
/// Returns the interesting events if there are any, or waits for them to happen if there are
|
||||
|
@ -26,7 +26,7 @@ impl TryFrom<u8> for SigNum {
|
||||
}
|
||||
|
||||
impl SigNum {
|
||||
/// Caller must ensure the sig_num is valid. otherweise, use try_from will check sig_num and does not panic.
|
||||
/// Caller must ensure the sig_num is valid. Otherwise, use try_from will check sig_num and does not panic.
|
||||
pub const fn from_u8(sig_num: u8) -> Self {
|
||||
if sig_num > MAX_RT_SIG_NUM || sig_num < MIN_STD_SIG_NUM {
|
||||
panic!("invalid signal number")
|
||||
|
@ -83,7 +83,7 @@ impl SigStack {
|
||||
self.handler_counter -= 1
|
||||
}
|
||||
|
||||
/// Determins whether the stack is executed on by any signal handler
|
||||
/// Determines whether the stack is executed on by any signal handler
|
||||
pub fn is_active(&self) -> bool {
|
||||
// FIXME: can DISABLE stack be used?
|
||||
self.handler_counter != 0 && !self.flags.contains(SigStackFlags::SS_AUTODISARM)
|
||||
|
@ -41,7 +41,7 @@ impl FaultSignal {
|
||||
let addr = Some(trap_info.page_fault_addr as u64);
|
||||
(SIGSEGV, code, addr)
|
||||
}
|
||||
_ => panic!("Exception cannnot be a signal"),
|
||||
_ => panic!("Exception cannot be a signal"),
|
||||
};
|
||||
FaultSignal { num, code, addr }
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ impl Condvar {
|
||||
}
|
||||
|
||||
/// Wait for the condition to become true,
|
||||
/// and until the condition is explicitly woken up or interupted.
|
||||
/// and until the condition is explicitly woken up or interrupted.
|
||||
///
|
||||
/// This function blocks until either the condition becomes false
|
||||
/// or the condition variable is explicitly notified.
|
||||
|
Reference in New Issue
Block a user