Lines Matching full:thread
226 /* Inform the grand-parent what the tid of this thread is. */ in pidfd_info_pause_thread()
240 pthread_t thread; in TEST_F() local
257 /* The thread will outlive the thread-group leader. */ in TEST_F()
258 if (pthread_create(&thread, NULL, pidfd_info_pause_thread, &ipc_sockets[1])) in TEST_F()
261 /* Make the thread-group leader exit prematurely. */ in TEST_F()
266 * Opening a PIDFD_THREAD aka thread-specific pidfd based on a in TEST_F()
267 * thread-group leader must succeed. in TEST_F()
276 * We can't poll and wait for the old thread-group in TEST_F()
277 * leader to exit using a thread-specific pidfd. The in TEST_F()
278 * thread-group leader exited prematurely and in TEST_F()
294 /* Retrieve the tid of the thread. */ in TEST_F()
299 /* Opening a thread as a thread-group leader must fail. */ in TEST_F()
304 /* Opening a thread as a PIDFD_THREAD must succeed. */ in TEST_F()
311 * Note that pidfd_leader is a thread-group pidfd, so polling on it in TEST_F()
312 * would only notify us once all thread in the thread-group have in TEST_F()
314 * thread-group. in TEST_F()
317 /* Get PIDFD_GET_INFO using the thread-group leader pidfd. */ in TEST_F()
325 * Now retrieve the same info using the thread specific pidfd in TEST_F()
326 * for the thread-group leader. in TEST_F()
335 /* Now try the thread-specific pidfd. */ in TEST_F()
338 /* The thread hasn't exited, so no PIDFD_INFO_EXIT information yet. */ in TEST_F()
343 * Take down the whole thread-group. The thread-group leader in TEST_F()
344 * exited successfully but the thread will now be SIGKILLed. in TEST_F()
355 /* The thread-group leader has been reaped. */ in TEST_F()
359 * Retrieve exit information for the thread-group leader via the in TEST_F()
360 * thread-group leader pidfd. in TEST_F()
366 /* Even though the thread-group exited successfully it will still report the group exit code. */ in TEST_F()
371 * Retrieve exit information for the thread-group leader via the in TEST_F()
372 * thread-specific pidfd. in TEST_F()
379 /* Even though the thread-group exited successfully it will still report the group exit code. */ in TEST_F()
383 /* Retrieve exit information for the thread. */ in TEST_F()
389 /* The thread got SIGKILLed. */ in TEST_F()
402 /* Inform the grand-parent what the tid of this thread is. */ in pidfd_info_thread_exec()
418 pthread_t thread; in TEST_F() local
435 /* The thread will outlive the thread-group leader. */ in TEST_F()
436 if (pthread_create(&thread, NULL, pidfd_info_thread_exec, &ipc_sockets[1])) in TEST_F()
439 /* Make the thread-group leader exit prematurely. */ in TEST_F()
443 /* Open a thread-specific pidfd for the thread-group leader. */ in TEST_F()
451 * We can't poll and wait for the old thread-group in TEST_F()
452 * leader to exit using a thread-specific pidfd. The in TEST_F()
453 * thread-group leader exited prematurely and in TEST_F()
457 * When the thread has execed it will taken over the old in TEST_F()
458 * thread-group leaders struct pid. Calling poll after in TEST_F()
459 * the thread execed will thus block again because a new in TEST_F()
460 * thread-group has started. in TEST_F()
474 /* Retrieve the tid of the thread. */ in TEST_F()
478 /* Opening a thread as a PIDFD_THREAD must succeed. */ in TEST_F()
482 /* Now that we've opened a thread-specific pidfd the thread can exec. */ in TEST_F()
488 /* Wait until the kernel has SIGKILLed the thread. */ in TEST_F()
493 /* The thread has been reaped. */ in TEST_F()
496 /* Retrieve thread-specific exit info from pidfd. */ in TEST_F()
501 * While the kernel will have SIGKILLed the whole thread-group in TEST_F()
509 * The thread-group leader is still alive, the thread has taken in TEST_F()
518 /* Take down the thread-group leader. */ in TEST_F()
522 * Afte the exec we're dealing with an empty thread-group so now in TEST_F()
523 * we must see an exit notification on the thread-specific pidfd in TEST_F()
524 * for the thread-group leader as there's no subthread that can in TEST_F()
536 /* Retrieve exit information for the thread-group leader. */ in TEST_F()
551 /* Inform the grand-parent what the tid of this thread is. */ in pidfd_info_thread_exec_sane()
567 pthread_t thread; in TEST_F() local
584 /* The thread will outlive the thread-group leader. */ in TEST_F()
585 if (pthread_create(&thread, NULL, pidfd_info_thread_exec_sane, &ipc_sockets[1])) in TEST_F()
589 * Pause the thread-group leader. It will be killed once in TEST_F()
596 /* Retrieve the tid of the thread. */ in TEST_F()
600 /* Opening a thread as a PIDFD_THREAD must succeed. */ in TEST_F()
604 /* Open a thread-specific pidfd for the thread-group leader. */ in TEST_F()
613 * thread-group leader will be assumed by the subthread which in TEST_F()
614 * becomes the new thread-group leader. So no exit notification in TEST_F()
630 /* Now that we've opened a thread-specific pidfd the thread can exec. */ in TEST_F()
635 /* Wait until the kernel has SIGKILLed the thread. */ in TEST_F()
640 /* The thread has been reaped. */ in TEST_F()
643 /* Retrieve thread-specific exit info from pidfd. */ in TEST_F()
648 * While the kernel will have SIGKILLed the whole thread-group in TEST_F()
656 * The thread-group leader is still alive, the thread has taken in TEST_F()
665 /* Take down the thread-group leader. */ in TEST_F()
669 * Afte the exec we're dealing with an empty thread-group so now in TEST_F()
670 * we must see an exit notification on the thread-specific pidfd in TEST_F()
671 * for the thread-group leader as there's no subthread that can in TEST_F()
683 /* Retrieve exit information for the thread-group leader. */ in TEST_F()