MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / TLSInfo_SetThreadSysinfo

Function TLSInfo_SetThreadSysinfo

src/tls.cpp:482–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482void
483TLSInfo_SetThreadSysinfo(void *sysinfo)
484{
485#if defined(__i386__) || defined(__x86_64__)
486 asm volatile (CLEAN_FOR_64_BIT(mov %0, %%gs:) DEFAULT_SYSINFO_OFFSET "\n\t"
487 : : "r" (sysinfo));
488#elif defined(__arm__)
489 mtcp_sys_kernel_set_tls(sysinfo);
490#elif defined(__aarch64__)
491 asm volatile ("msr tpidr_el0, %[gs]" : :[gs] "r" (sysinfo));
492#elif defined(__riscv)
493 asm volatile("addi tp, %[gs], 0" :: [gs] "r" (sysinfo));
494#else /* if defined(__i386__) || defined(__x86_64__) */
495# error "current architecture not supported"
496#endif /* if defined(__i386__) || defined(__x86_64__) */
497}
498
499/*****************************************************************************
500 *

Callers 2

postRestartWorkMethod · 0.85
restarthreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected