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

Code snippet in one of "CPUSets for game development" sections can be misleading #3025

Open
CookiePLMonster opened this issue Mar 23, 2021 · 0 comments · May be fixed by #4900
Open

Code snippet in one of "CPUSets for game development" sections can be misleading #3025

CookiePLMonster opened this issue Mar 23, 2021 · 0 comments · May be fixed by #4900
Assignees
Labels
doc-bug feedback is about something that is out of date, unclear, confusing, or broken in the article games/tech Pri2 uwp/prod

Comments

@CookiePLMonster
Copy link

This feedback concerns the SetThreadSelectedCpuSets section of the content. The documentation for a SYSTEM_CPU_SET_INFORMATION structure states:

This is a variable-sized structure designed for future expansion. When iterating over this structure, use the size field to determine the offset to the next structure.

Despite that, the code snippet in the aforementioned section clearly indexes the structure directly, therefore breaking the contract established by the documentation:

unsigned long cores [] = { cpuSets[0].CpuSet.Id, cpuSets[1].CpuSet.Id };

This could be easily overlooked and copied directly to the user code, potentially leading to compatibility issues if Microsoft ever expands this structure or adds additional information types other than CpuSetInformation.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@hkhmsft hkhmsft added the doc-bug feedback is about something that is out of date, unclear, confusing, or broken in the article label Apr 5, 2021
@PRMerger9 PRMerger9 added the Pri2 label Apr 13, 2021
QuinnRadich added a commit that referenced this issue Oct 5, 2022
…c_temp

For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-bug feedback is about something that is out of date, unclear, confusing, or broken in the article games/tech Pri2 uwp/prod
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants