Improve comments near un-implemented functionality

This commit is contained in:
Robin Voetter 2019-08-30 12:58:44 +02:00
parent 2323da3a68
commit c1f8b201a1
2 changed files with 5 additions and 4 deletions

View File

@ -80,7 +80,8 @@ pub fn syscall6(
pub extern fn clone(func: extern fn (arg: usize) u8, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize;
// LLVM calls this when the read-tp-hard feature is set to false. Currently, there is no way to pass
// that to llvm via zig. See https://github.com/ziglang/zig/issues/2883
// that to llvm via zig, see https://github.com/ziglang/zig/issues/2883.
// LLVM expects libc to provide this function as __aeabi_read_tp, so it is exported if needed from special/c.zig.
pub nakedcc fn getThreadPointer() usize {
return asm volatile("mrc p15, 0, %[ret], c13, c0, 3"
: [ret] "=r" (-> usize)

View File

@ -150,9 +150,9 @@ pub fn initTLS() void {
if (builtin.arch == builtin.Arch.arm and builtin.os == .linux) {
if (at_hwcap & std.os.linux.HWCAP_TLS == 0) {
// If the CPU does not support TLS via a coprocessor register,
// it could be accessed via a kernel helper function
// see musl/src/thread/arm/ for details
@panic("cpu does not support TLS via coprocessor register");
// a kernel helper function can be used instead on certain linux kernels.
// See linux/arch/arm/include/asm/tls.h and musl/src/thread/arm/__set_thread_area.c.
@panic("TODO: Implement ARM fallback TLS functionality");
}
}