Skip to content

Conversation

rettichschnidi
Copy link
Contributor

@rettichschnidi rettichschnidi commented Mar 13, 2024

This adds sys_*_*40 functions that operation on a 40 bits values.

The motivation for this PR is to allow extending the net_buf functionality to support 40 bit values (#70177).

Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

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

OK, I'll bite: why do we want support for variable-endian 5-byte integers in OS code? This seems like some kind of special purpose data type for a particular app or hardware or problem area? Do any other systems have libraries like this?

Just seems like code that wants to live closer to whatever it's application area is.

@rettichschnidi
Copy link
Contributor Author

OK, I'll bite: why do we want support for variable-endian 5-byte integers in OS code? This seems like some kind of special purpose data type for a particular app or hardware or problem area?

I want to extend the net_buf functionality to support 40 bit values (#70177). As the existing net_buf functionality makes use of Zephyr kernel code, I figured it makes sense to keep the additional net_buf code aligned and extend the kernel code accordingly.

Do any other systems have libraries like this?

No idea.

Just seems like code that wants to live closer to whatever it's application area is.

I think the discussion boils down to whether one agrees that the 40 bit functionality in net_buf makes sense.

@rettichschnidi
Copy link
Contributor Author

rettichschnidi commented Mar 15, 2024

Marking as draft again, because I need to sort out #70305 first. done

@rettichschnidi rettichschnidi marked this pull request as draft March 15, 2024 23:12
This adds sys_*_*40 functions that operation on a 40 bits values.

Signed-off-by: Reto Schneider <[email protected]>
@rettichschnidi rettichschnidi force-pushed the gardena/rs/upstream/sys-byteorder-40 branch from e82061e to 8ab6d81 Compare March 22, 2024 23:14
@rettichschnidi
Copy link
Contributor Author

Just seems like code that wants to live closer to whatever it's application area is.

I think the discussion boils down to whether one agrees that the 40 bit functionality in net_buf makes sense.

Closing this PR because its justification depends entirely on #70177. Better to discuss only once whether adding such functionality to net_buf is a valuable contribution.

@rettichschnidi rettichschnidi deleted the gardena/rs/upstream/sys-byteorder-40 branch March 22, 2024 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Base OS Base OS Library (lib/os) area: Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants