V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sorasyl
V2EX  ›  程序员

thread_create 之后 TPIDRRO_EL0 寄存器在 thread_resume 未被赋值

  •  
  •   sorasyl · 103 天前 · 599 次点击
    这是一个创建于 103 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我试了下直接修改 state 没办法调用 printf 或者 dlopen 之类使用 TLS 的函数 有没有办法回避这个问题

    M1 版本的 mac ,macos 13.1 (22C65)

    sorasyl
        1
    sorasyl  
    OP
       103 天前
    试了下内联汇编,只有内核有权限给 TPIDRRO_EL0 赋值
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2982 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 13:28 · PVG 21:28 · LAX 06:28 · JFK 09:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.