diff options
author | Niels Möller <nisse@lysator.liu.se> | 2015-01-13 17:43:07 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2015-01-13 17:43:07 +0100 |
commit | 44f2687d2cd8f6d2163a43f7299e2b903f6e4552 (patch) | |
tree | 4bf7e1d4cc8274fe4828b53c1d19f57ddc1a11e9 /x86_64 | |
parent | 29d6dacfa0cbb90b47ed64fea1e42c489c607f40 (diff) | |
download | nettle-44f2687d2cd8f6d2163a43f7299e2b903f6e4552.tar.gz |
Explain why x86_64 fat initialization doesn't need any memory barrier.
Diffstat (limited to 'x86_64')
-rw-r--r-- | x86_64/fat/fat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/x86_64/fat/fat.c b/x86_64/fat/fat.c index 7deb45ae..fc022b9e 100644 --- a/x86_64/fat/fat.c +++ b/x86_64/fat/fat.c @@ -150,10 +150,10 @@ fat_init (void) _aes_encrypt_vec = _nettle_aes_encrypt_x86_64; _aes_decrypt_vec = _nettle_aes_decrypt_x86_64; } - /* FIXME: We ought to use some thread-aware memory barrier before - setting the initialized flag. For now, just do another cpuinfo - call to get some synchronization. */ - _nettle_cpuid (1, cpuid_data); + + /* The x86_64 architecture should always make stores visible in the + right order to other processors (except for non-temporal stores + and the like). So we don't need any memory barrier. */ initialized = 1; } |