add hijack destination function to dummy for thread hijacking testing
This commit is contained in:
parent
0d57997a19
commit
57c74b1abb
1 changed files with 7 additions and 0 deletions
|
|
@ -49,9 +49,16 @@ __attribute__((noreturn)) void* slave3_job(void*)
|
|||
}
|
||||
}
|
||||
|
||||
__attribute__((noreturn)) void* hijack_destination(void*)
|
||||
{
|
||||
puts("thread has been redirected to this function! cool!");
|
||||
while (1) sleep(1);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
status("master");
|
||||
printf("hijack_destination: %p\n", hijack_destination);
|
||||
|
||||
pid_t slave1 = fork();
|
||||
if (!slave1) slave1_job();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue