microsoft / microsoft/litebox

Explicit thread-spawn-context construction

Open
#429 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion enhancement layer-litebox
Dominant language
Rust
Stars
2.7k
Forks
144
Avg merge
12h 21m
Merged PRs (30d)
146

Description

I am not particularly jazzed about the fact that we are just depending on an implicit constructability of the ctx object on the shim side when performing a thread spawn. It makes the "context must be valid" difficult to actually reason about on its own.

The implicit constructability for the Linux shim comes from the PtRegs shared by the platform and shims via linux-common, but I think a better design might be possible here.

Not yet sure of a good design for this, and the current one is GoodEnough™️, so am mostly opening this as a tracking issue more than anything particularly concrete.

Related: https://github.com/microsoft/litebox/pull/423#discussion_r2434326901

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing thread-spawn context construction between the Linux shim and the shared PtRegs definition in linux-common. Clarify how context validity is established and compare possible explicit-construction designs. Done means an agreed design that removes reliance on implicit ctx constructability.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.