mirror of
https://github.com/ziglang/zig.git
synced 2026-11-11 23:19:30 -05:00
std: align(16) main_thread_tls_buffer
Before this change, thread local variables were landmines if LLVM decided to optimize any writes to them using vector instructions.
This commit is contained in:
1 parent
9b86dde7b9
commit
ad05509930
1 file changed
+1
-1
@@ -327,7 +327,7 @@ pub fn prepareTLS(area: []u8) usize {
|
||||
if (tls_tp_points_past_tcb) tls_image.data_offset else tls_image.tcb_offset;
|
||||
}
|
||||
|
||||
var main_thread_tls_buffer: [256]u8 = undefined;
|
||||
var main_thread_tls_buffer: [256]u8 align(16) = undefined;
|
||||
|
||||
pub fn initStaticTLS() void {
|
||||
initTLS();
|
||||
|
||||
Reference in new issue
Block a user