Skip to content

Add Exit system call class to Tock 2.0.#2378

Merged
bors[bot] merged 24 commits intotock-2.0-devfrom
exit_2.0
Jan 29, 2021
Merged

Add Exit system call class to Tock 2.0.#2378
bors[bot] merged 24 commits intotock-2.0-devfrom
exit_2.0

Conversation

@phil-levis
Copy link
Copy Markdown
Contributor

@phil-levis phil-levis commented Jan 23, 2021

Pull Request Overview

This pull request adds the Exit system call class to Tock 2.0, including exit-terminate and exit-restart. It refactors some of the process restart code to separate policy from mechanism. It builds on the yield_2.0 branch/PR #2351 . This borrows heavily from @torfmaster's #1624.

Testing Strategy

This pull request was tested by running the restart and terminate test apps in libtock-c. Both behave as expected, and work correctly with process console.

TODO or Help Wanted

This pull request doesn't need anything, but process console could probably benefit from a command to reboot a process as well as one to start a terminated process.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@phil-levis phil-levis added the tock-2.0 Issues and PRs related to Tock version 2.0. label Jan 23, 2021
@phil-levis phil-levis changed the base branch from yield_2.0 to tock-2.0-dev January 23, 2021 05:04
Comment thread doc/reference/trd-syscalls.md
@phil-levis phil-levis requested a review from alistair23 January 25, 2021 22:15
Comment thread doc/reference/trd-syscalls.md
Comment thread doc/reference/trd-syscalls.md Outdated
@hudson-ayers hudson-ayers added the P-Significant This is a substancial change that requires review from all core developers. label Jan 28, 2021
@bradjc
Copy link
Copy Markdown
Contributor

bradjc commented Jan 28, 2021

This PR will be hard to reconcile with master. Can you move the restart function back to where it was (at least in git's view) so the diff is smaller?

@phil-levis
Copy link
Copy Markdown
Contributor Author

phil-levis commented Jan 28, 2021

This PR will be hard to reconcile with master. Can you move the restart function back to where it was (at least in git's view) so the diff is smaller?

I don't think so, because now it's inside the ProcessType trait (is invoked from sched.rs)? My thought is that this mechanism (the policy is in try_restart) should be available through the kernel. The policy in try_restart is in response to a userspace request. A command from pconsole might be handled differently.

@phil-levis
Copy link
Copy Markdown
Contributor Author

Let's discuss this on the core call tomorrow? Since it's a major change I'd like a little discussion before merging.

@phil-levis
Copy link
Copy Markdown
Contributor Author

phil-levis commented Jan 29, 2021

OK, in response to the discussion on the core call today, I moved the restart mechanism out of the ProcessType trait so that all attempts to restart a process must flow through the policy implemented in try_restart. I will think about a later PR that separates this out with the explanation why it is necessary to have extensible policies within the kernel.

@phil-levis
Copy link
Copy Markdown
Contributor Author

bors r+

@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Jan 29, 2021

@bors bors Bot merged commit 9f7d6fc into tock-2.0-dev Jan 29, 2021
@bors bors Bot deleted the exit_2.0 branch January 29, 2021 22:44
lschuermann pushed a commit to lschuermann/tock that referenced this pull request Mar 20, 2021
2378: Add Exit system call class to Tock 2.0. r=phil-levis a=phil-levis

### Pull Request Overview

This pull request adds the Exit system call class to Tock 2.0, including `exit-terminate` and `exit-restart`. It refactors some of the process restart code to separate policy from mechanism. It builds on the `yield_2.0` branch/PR tock#2351 . This borrows heavily from @torfmaster's tock#1624. 


### Testing Strategy

This pull request was tested by running the `restart` and `terminate` test apps in libtock-c. Both behave as expected, and work correctly with process console.


### TODO or Help Wanted

This pull request doesn't need anything, but process console could probably benefit from a command to reboot a process as well as one to start a terminated process.

### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: Philip Levis <pal@cs.stanford.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel P-Significant This is a substancial change that requires review from all core developers. tock-2.0 Issues and PRs related to Tock version 2.0.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants