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

Let (user space) Task ID start with 1, so 0 can be easily checked as "invalid" task ID #79

Open
fachat opened this issue Mar 12, 2024 · 0 comments
Labels
api-breaking Changes that break the kernel API and require re-writing or at lease adapting some code enhancement New feature or request
Milestone

Comments

@fachat
Copy link
Owner

fachat commented Mar 12, 2024

Maybe as a first iteration:

  • just the mapping by adding/subtracting 1.

Then, potentially:
map 1,2,3,4,5, ... as user space task ID to the kernel space task IDs that are indexes into the task table. This would reduce potential for errors when an invalid task ID is given to the kernel.

Note: this potentially breaks API in the new GETINFO2 for example. Hopefully we can limit the effect (e.g. define TID_INVAL as GETINFO2 starting ID...)

@fachat fachat added enhancement New feature or request api-breaking Changes that break the kernel API and require re-writing or at lease adapting some code labels Mar 12, 2024
@fachat fachat added this to the 2.3 milestone Mar 12, 2024
@fachat fachat changed the title Let (external) Task ID start with 1, so 0 can be easily checked as "invalid" task ID Let (user space) Task ID start with 1, so 0 can be easily checked as "invalid" task ID Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-breaking Changes that break the kernel API and require re-writing or at lease adapting some code enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant