Skip to content
Snippets Groups Projects
Commit f3c2c12f authored by Robert Schmidt's avatar Robert Schmidt
Browse files

Fix alignment of Tpool user data to 32 bytes

The thread pool provides user data to be stored by (pre-)allocating the
necessary memory. A previous attempt was made to have this user data
aligned on a 32 byte boundary (e.g., to prevent segfault with SIMD
instructions, or avoid inefficient data access); the current
implementation, however, leads to unaligned memory access.

This patch attempts again to implement user data to be 32 byte aligned.
First, use memalign() to allocate the actual job on a 32 byte boundary.
Second, use alignas(32) to align the pointer to the user data to be
aligned to 32 bytes. Since it is the last member of the struct, this
ensures that user data, which is allocated right behind it, will be
aligned to 32 bytes as well.
parent 537605a6
No related branches found
No related tags found
3 merge requests!2293integration_2023_w32,!2285Draft: Fix alignment of Tpool user data to 32 bytes,!2261Draft: Sidelink Initial Sync Procedures
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment