Commit Graph

69 Commits

Author SHA1 Message Date
f762eb8913 Remove the lazy_static dependency 2024-11-28 15:28:30 +08:00
fab61f5f66 Make Pollee stateless 2024-11-20 16:39:18 +08:00
39d303c72f Rename get_current_userspace to current_userspace 2024-11-15 13:24:58 +08:00
96de617ad9 Rename get_user_space to user_space 2024-11-15 13:24:58 +08:00
e6c613f538 Rename (Posix)ThreadExt to As(Posix)Thread 2024-11-13 21:44:37 +08:00
9233d1cdbb Add ThreadExt and clean up PosixThreadExt 2024-11-13 21:44:37 +08:00
4ea3e49788 Refactor Vmar and VmMapping.
Co-authored-by: Zhang Junyang <junyang@stu.pku.edu.cn>
2024-11-13 17:29:57 +08:00
ac71234b89 Remove {,un}register_observer 2024-11-13 14:15:44 +08:00
e32fb2f91b Introduce PollAdaptor and Poller 2024-11-13 14:15:44 +08:00
f12e502ab0 Rename Poller to PollHandle 2024-11-13 14:15:44 +08:00
32b8e05cc3 Make *_or_timeout APIs concise 2024-11-09 10:25:24 +08:00
10cc85d588 Add syscall getpgid 2024-11-09 10:20:57 +08:00
1fe74c9c92 Add sys_getrlimit and sys_setrlimit 2024-11-06 21:53:31 +08:00
7a08d9a660 Support other SigStackFlags 2024-11-06 15:00:01 +08:00
4701eaf0cb Implementation of load average calculation and corresponding /proc entry
Moved everything into the kernel side. Add a SchedulerStats trait

Use 'fixed' to represent fixed-point numbers

Make the loadavg calculation lazy
2024-11-05 11:46:23 +08:00
7ddfd42baa Make wait_events support timeout 2024-11-01 13:00:40 +08:00
f21394c679 Use more wait_events 2024-11-01 13:00:40 +08:00
846b3ba169 Use LinkedList to store WorkItem to avoid additional heap allocation 2024-11-01 11:24:09 +08:00
96a153dfc5 Implement dummy metadata() for epoll and socket files 2024-10-30 14:09:02 +08:00
3461bd5de6 Add more boundary checks for epoll_wait 2024-10-30 10:42:16 +08:00
b5610f3034 Report POLLNVAL in poll for invalid FDs 2024-10-28 14:33:32 +08:00
390aa411bd Beautify the poll() system call 2024-10-28 14:33:32 +08:00
6ece48c095 Refactor process table 2024-10-28 13:00:13 +08:00
e319641b4d Implement system call sched_get/set_affinity 2024-10-26 22:06:41 +08:00
885e4315e3 fix a comment typo at kernel/src/syscall/mod.rs 2024-10-25 13:26:45 +08:00
03906513aa Clear one bit instead 2024-10-21 09:43:43 +08:00
89d04ecf7d Implement ioctl() FIOCLEX command 2024-10-21 09:43:43 +08:00
1fe0a138f9 PROT_WRITE implies PROT_READ on x86 2024-10-17 08:56:47 +08:00
9e4257b655 Fix multiple issues pointed out by the new compiler 2024-10-13 22:32:05 +08:00
bdf89a5de3 Implement getcwd() 2024-10-12 09:58:45 +08:00
ea489252f4 Refactor Dentry to optimize the vfs layer 2024-10-11 11:22:52 +08:00
44760eb5fa Return when sigset size error for rt_sigsuspend, rt_sigprocmask and rt_sigaction 2024-09-30 20:24:23 +08:00
4fa0e6334b Add RISC-V base support 2024-09-30 10:02:08 +08:00
8927031426 Remove priority field from OSTD Task struct 2024-09-27 10:21:45 +08:00
0a36760f7a Respect user-defined exit signal in clone() and clone3()
When calling clone() and clone3(), the user is allowed to specify a
signal to be sent to the parent process on exit. Respect this value by
storing it in the Process struct and sending the signal on exit.

Add a test as well to verify that the signal is properly delivered to
the parent.
2024-09-26 20:07:43 +08:00
130a0f7030 Homogenize arguments for clone() and clone3()
The arguments for both syscalls follow different formats. Rewrite the
CloneArgs struct to homogenize both formats into one.
2024-09-26 20:07:43 +08:00
fb718fd440 Optimize the latency of lat-sig-install 2024-09-25 17:29:20 +08:00
21fedd1b60 Implement atomic wrapper for integer-like type 2024-09-25 14:47:37 +08:00
cbe85a1878 Add check for negative timeval_t.sec in do_futimesat 2024-09-24 20:36:29 +08:00
46708f84bc Implement futex private flag 2024-09-22 16:00:56 +08:00
985813c7f9 Use IoVec-based reader/writer to refactor network APIs 2024-09-20 10:37:20 +08:00
b4003b8aeb Add normalize for timeval_t and const value for time 2024-09-20 10:35:03 +08:00
4fa4e5ef2a Add check during the conversion from timeval_t to Duration 2024-09-20 10:35:03 +08:00
70505ff4f8 Support futex wait timeout 2024-09-19 22:42:13 +08:00
c2f7a10b84 Implement cpu_local with GS and ensure GS points to TSS 2024-09-19 13:00:36 +08:00
f3174dbbbc Make task store Arc<Thread> and process store Arc<Task> 2024-09-14 17:34:14 +08:00
81b0f265b5 Move Tid from Thread to PosixThread 2024-09-14 17:34:14 +08:00
42e28763c5 Replace the Pausers' usage with Waiter/WaitQueue 2024-09-14 13:59:07 +08:00
fc895c5697 Fix panic in mmap by invalid perms 2024-09-13 23:42:37 +08:00
8421046dba Return when sigset size error 2024-09-13 22:12:50 +08:00