Skip to content

Commit 4bd0823

Browse files
committed
x509storeissuer: make thread_data cache-line-aligned
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
1 parent 1c31de4 commit 4bd0823

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
@@ -73,7 +73,16 @@ struct nonce_cfg {
7373
size_t num_dirs;
7474
};
7575

76-
struct thread_data {
76+
/* Cache line size is either 32 or 64 bytes on most arches of interest */
77+
#if defined(__GNUC__) || defined(__clang__)
78+
# define ALIGN64 __attribute((aligned(64)))
79+
#elif defined(_MSC_VER)
80+
# define ALIGN64 __declspec(align(64))
81+
#else
82+
# define ALIGN64
83+
#endif
84+
85+
ALIGN64 struct thread_data {
7786
OSSL_TIME start_time;
7887
struct {
7988
uint64_t count;

0 commit comments

Comments
 (0)