rust-kernel
Rustbelt: a hobby x86_64 kernel written in Rust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | //! Stage 16, "libc batch 1": the system calls musl and dash use once a
//! program is running -- signal waiting (rt_sigsuspend, sigtimedwait,
//! sigqueueinfo, sigaltstack), umask and rlimits, fcntl record locks,
//! truncate/fsync/chmod/utimensat, prctl, sched_getaffinity, madvise,
//! robust futex lists, and what happens to orphaned children. The detailed
//! checks live in user/libctest.rs (exit code = failed checks); this file
//! runs each group and checks nothing is left behind.
extern crate alloc;
use String;
use ;
use PanicInfo;
use ;
use ;
entry_point!;
!
/// Run one group twice (the first warms caches), check it passes and
/// threads, processes, memory frames and file locks come back to where
/// they were.
/// dash's `wait`: block SIGCHLD, fork, rt_sigsuspend until the handler ran.
/// Before stage 16 rt_sigsuspend was ENOSYS and dash spun forever here.
/// rt_sigpending, rt_sigtimedwait, queued real-time signals, sigaltstack.
/// fcntl: F_GETFL/F_SETFL, F_DUPFD vs RLIMIT_NOFILE, record locks between
/// processes (conflicts, waiting, EDEADLK, dropped on close and exit).
/// truncate/ftruncate, fsync, chmod family, umask, utimensat on ramfs,
/// ext2 and FAT; EROFS on btrfs.
/// rlimits, prctl, sched_getaffinity, madvise, robust futex lists.
/// A process exits leaving a running child and a zombie child: both are
/// cleaned up (their frames come back); a PR_SET_CHILD_SUBREAPER ancestor
/// adopts and reaps orphans instead.
/// `--trace` names syscalls it doesn't know by number.
!
|