Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BSD socket layer #633

Merged
merged 31 commits into from
Jan 25, 2023
Merged

add BSD socket layer #633

merged 31 commits into from
Jan 25, 2023

Conversation

stlankes
Copy link
Contributor

@stlankes stlankes commented Dec 18, 2022

This PR realize a classical BSD socket layer. To realize a BSD socket layer, the executor has to return directly UNIX-like error number because the layer depends on a C interface and doesn't support Rust's error handling.

@stlankes stlankes marked this pull request as draft December 18, 2022 10:39
@stlankes
Copy link
Contributor Author

@mkroening A network interrupt has to wakeup all async tasks to check their tasks. Currently, I use a BtreeMap to store all blocked async tasks. The interrupts clears the map and wakeup all tasks. Do you have an better idea?

@stlankes stlankes marked this pull request as ready for review January 8, 2023 23:32
@mkroening mkroening self-requested a review January 9, 2023 12:45
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. 👍

I also opened two PRs regarding RwLocks:

They don't block this PR though. We can decide between them later.

@stlankes
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Jan 25, 2023
@stlankes stlankes merged commit 99d90da into hermit-os:master Jan 25, 2023
@bors
Copy link
Contributor

bors bot commented Jan 25, 2023

bors bot added a commit to hermit-os/hermit-rs that referenced this pull request Jan 25, 2023
388: add BSD socket layer r=stlankes a=stlankes

The new BSD socket layer depends on hermit-os/kernel#633 and a revised version of `std`. `std` is part of the [rust](/hermitcore/rust/tree/socket) fork. Note: If you use this version, please modify `Cargo.toml`.  [`hermit-abi`](https://github.com/hermitcore/rust/blob/socket/library/std/Cargo.toml#L45) must point to the version of this PR.    

Co-authored-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
bors bot added a commit to hermit-os/hermit-rs that referenced this pull request Jan 25, 2023
388: add BSD socket layer r=stlankes a=stlankes

The new BSD socket layer depends on hermit-os/kernel#633 and a revised version of `std`. `std` is part of the [rust](/hermitcore/rust/tree/socket) fork. Note: If you use this version, please modify `Cargo.toml`.  [`hermit-abi`](https://github.com/hermitcore/rust/blob/socket/library/std/Cargo.toml#L45) must point to the version of this PR.    

Co-authored-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants