Skip to content

Commit 9147f7f

Browse files
committed
x509storeissuer: make thread_data cache-line-aligned
Signed-off-by: Eugene Syromiatnikov <[email protected]>
1 parent 806e3ee commit 9147f7f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

source/x509storeissuer.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,16 @@ struct nonce_cfg {
8989
size_t num_dirs;
9090
};
9191

92-
struct thread_data {
92+
/* Cache line size is either 32 or 64 bytes on most arches of interest */
93+
#if defined(__GNUC__) || defined(__clang__)
94+
# define ALIGN64 __attribute((aligned(64)))
95+
#elif defined(_MSC_VER)
96+
# define ALIGN64 __declspec(align(64))
97+
#else
98+
# define ALIGN64
99+
#endif
100+
101+
ALIGN64 struct thread_data {
93102
OSSL_TIME start_time;
94103
struct {
95104
uint64_t count;

0 commit comments

Comments
 (0)