Skip to content

Instantly share code, notes, and snippets.

@ur10
Last active August 24, 2020 16:36
Show Gist options
  • Save ur10/a1829b7b8648521d90703be014e3feef to your computer and use it in GitHub Desktop.
Save ur10/a1829b7b8648521d90703be014e3feef to your computer and use it in GitHub Desktop.
stack_share(void *arg)
{
/* Share the stack **/
mmap(addr, len, prot, flags, fd, off);
/* Other relevant information **/
}
POSIX_Init()
{
pthread_create(&id, &attr, stack_share, arg);
}
/** mmap implementation */
mmap()
{
executing = Thread_Get_executing();
Stack_protection_share_stack();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment