Summary: This makes merge conflicts much easier to handle.
Reviewed By: johnhurt
Differential Revision: D37564000
fbshipit-source-id: a7f1a2711ffbdbb23c93e2f479f47d0368a2dad9
Summary:
From the changelog:
- Added `SysnoSet` for constructing sets of syscalls. It uses a bitset under
the hood and provides constant-time lookup and insertion of `Sysno`s.
- Fixed `Sysno::len()` returning the wrong value for architectures with large
syscall offsets.
- Deprecated `Sysno::len()`. Use `Sysno::table_size()` instead. This will be
removed in the next major version.
Differential Revision: D37556871
fbshipit-source-id: a287f2146a0776e6f0459a08b43a1d5a92bb6176
Summary: The OSS license linter doesn't like the word "its".
Reviewed By: johnhurt
Differential Revision: D36856385
fbshipit-source-id: 909037d96de8976f08004497d28b77838f8c6870
Summary:
Changelog:
* Removed `build.rs` and switched to Rust's inline assembly syntax. This should enable better codegen, including the ability to have syscalls get inlined.
* **Breaking**: Architectures besides `arm`, `x86`, and `x86-64` now require nightly.
* **Breaking**: Removed top-level `SYS_` constants. Just use the `Sysno` enum instead.
Reviewed By: johnhurt
Differential Revision: D36606892
fbshipit-source-id: 9d20addfec65fa712b25d9449ec6e414187565ca
Summary:
See https://github.com/jasonwhite/syscalls/blob/master/CHANGELOG.md
The biggest change here is that the type of syscall registers and return values was changed from `u64` to `usize` (to support 32-bit architectures).
Reviewed By: zertosh
Differential Revision: D36157822
fbshipit-source-id: d8776b6809dd00df93b147ee34deb37df61a2675
Summary:
Add NanosleepFamily of syscalls, namely `nanosleep` and `clock_nanosleep`.
`nanosleep` can be transformed into `clock_nanosleep` by using clockid `CLOCK_REALTIME` and flags 0 (i.e., *not* `TIMER_ABSTIME`).
Reviewed By: johnhurt
Differential Revision: D35577747
fbshipit-source-id: 5925b083b4a49cdbfdff11117156d6366947d706
Summary: Expose the child TID arg passed to clone family syscalls. For fork and vfork this will be 0 as child TID is not an arg, for clone and clone3 this is read from the args.
Reviewed By: jasonwhite
Differential Revision: D35370069
fbshipit-source-id: 32821152adaadd17c66f334f286f5410fabd4b97
Summary:
This is called when creating a slave from a master pty and returns a file descriptor.
Usage example:
```
async fn handle_ioctl<G: Guest<Self>>(
&self,
guest: &mut G,
syscall: Ioctl,
) -> Result<i64, Errno> {
use reverie::syscalls::ioctl;
match syscall.request() {
ioctl::Request::TIOCGPTPEER(flags) => {
let fd = guest.inject(syscall).await?;
// Do something with the flags and fd ...
Ok(fd)
}
_ => Ok(guest.inject(syscall).await?)
}
}
```
Reviewed By: wangbj, igorsugak
Differential Revision: D33961825
fbshipit-source-id: 0e6d4a0ed984a4b96b2501095dd44a978030788e
Summary: Adds support for the `clone3` syscall, which is now used by `pthread_create`. This also introduces `CloneFamily`, which abstracts `fork`, `vfork`, `clone`, and `clone3`.
Reviewed By: johnhurt
Differential Revision: D33865362
fbshipit-source-id: 8b91225c63ff6a8aa9c283877a30f58aa4cd9bb2
Summary: This hasn't been necessary for quite a while now.
Reviewed By: wangbj
Differential Revision: D33411662
fbshipit-source-id: e6f88834521809b59323aa9d14796ff31571e7b6