Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenRuiwei committed Jul 31, 2024
2 parents 986d193 + f216062 commit de73c2c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ target/
third-party/vendor/
crates/virtio-drivers/
crates/lwext4_rust/
testcase/24/final/
18 changes: 10 additions & 8 deletions kernel/src/task/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ pub struct Task {
/// Map of start address of shared memory areas to their keys in the shared
/// memory manager.
shm_ids: Shared<BTreeMap<VirtAddr, usize>>,
/// Parent process
/// Parent process.
parent: Shared<Option<Weak<Task>>>,
/// Children processes
/// Children processes.
// NOTE: Arc<Task> can only be hold by `Hart`, `UserTaskFuture` and parent `Task`. Unused task
// will be automatically dropped by previous two structs. However, it should be treated with
// great care to drop task in `children`.
children: Shared<BTreeMap<Tid, Arc<Task>>>,
/// Exit code of the current process
/// Exit code of the current process.
exit_code: AtomicI32,
/// Trap context for the task.
trap_context: SyncUnsafeCell<TrapContext>,
Expand All @@ -101,9 +101,9 @@ pub struct Task {
cwd: Shared<Arc<dyn Dentry>>,
/// Pending signals for the task.
sig_pending: SpinNoIrqLock<SigPending>,
/// Signal handlers
/// Signal handlers.
sig_handlers: Shared<SigHandlers>,
/// Optional signal stack for the task, settable via `sys_signalstack`.
/// Signal mask for the task.
sig_mask: SyncUnsafeCell<SigSet>,
/// Optional signal stack for the task, settable via `sys_signalstack`.
sig_stack: SyncUnsafeCell<Option<SignalStack>>,
Expand All @@ -115,13 +115,15 @@ pub struct Task {
itimers: Shared<[ITimer; 3]>,
/// Futexes used by the task.
robust: Shared<RobustListHead>,
///
/// Address of the task's thread ID.
tid_address: SyncUnsafeCell<TidAddress>,
/// Mask of CPUs allowed for the task.
cpus_allowed: SyncUnsafeCell<CpuMask>,
/// Process group ID of the task.
pgid: Shared<PGid>,
/// Elf file it executes on.
/// ELF file the task executes.
elf: SyncUnsafeCell<Arc<dyn File>>,
///
/// Command-line arguments for the task.
args: SyncUnsafeCell<Vec<String>>,
}

Expand Down
3 changes: 0 additions & 3 deletions modules/vfs-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ pub fn arc_zero() -> Arc<core::mem::MaybeUninit<usize>> {
Arc::<usize>::new_zeroed()
}




pub use dentry::*;
pub use file::*;
pub use file_system_type::*;
Expand Down

0 comments on commit de73c2c

Please sign in to comment.