I’m not that good with assembly. Could someone explain me what is happening on this line:
https://github.com/skeeto/pure-linux-threads-demo/blob/master/threads-x86_64.s#L93
I now that it prepares the location of the stack for clone. I think that it adds STACK_SIZE to have the end of the allocated stack, but why is - 8 needed?
I don’t know Linux threading at this level, but I’ve seen similar things done in assembly so a new thread/process will
retdown a different code path.Poking around, the blog post linked from the readme says:
Hey, I guessed right, yay.
Hmm – sadly doesn’t appear to account for thread-local storage (“the other TLS”), which I was hoping to see.