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

pvh: Add Bytes() for GDT. #162

Merged
merged 1 commit into from
Sep 21, 2023
Merged

pvh: Add Bytes() for GDT. #162

merged 1 commit into from
Sep 21, 2023

Conversation

bobuhiro11
Copy link
Owner

No description provided.

Also fix typo.

Signed-off-by: Nobuhiro MIKI <nob@bobuhiro11.net>
Copy link
Contributor

@ChriMarMe ChriMarMe left a comment

Choose a reason for hiding this comment

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

One nit. Other than that: Looks good to me.

Thank you for cleaning up some of my mess :D

Comment on lines +136 to +139
type GDT [4]uint64

func CreateGDT() GDT {
var gdtTable GDT
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we need a struct for GDT.
Sure, Byte function is cleaner, but we use it in one instance only once.

Also GDT can have more than 4 entries. :)

I leave it to you

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks for the review!

As you said, it's only used once now, but Bytes() functions are implemented the same meaning for various data structures and I find it easy to read.
If we need to make the number of entries variable length, we will handle that in a future PR.

@bobuhiro11 bobuhiro11 merged commit 62fda55 into main Sep 21, 2023
1 check passed
@bobuhiro11 bobuhiro11 deleted the cleanup_gdt_bytes branch September 21, 2023 16:16
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