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()
303 /* Opening a thread as a PIDFD_THREAD must succeed. */ in TEST_F()
310 * Note that pidfd_leader is a thread-group pidfd, so polling on it in TEST_F()
311 * would only notify us once all thread in the thread-group have in TEST_F()
313 * thread-group. in TEST_F()
316 /* Get PIDFD_GET_INFO using the thread-group leader pidfd. */ in TEST_F()
324 * Now retrieve the same info using the thread specific pidfd in TEST_F()
325 * for the thread-group leader. in TEST_F()
334 /* Now try the thread-specific pidfd. */ in TEST_F()
337 /* The thread hasn't exited, so no PIDFD_INFO_EXIT information yet. */ in TEST_F()
342 * Take down the whole thread-group. The thread-group leader in TEST_F()
343 * exited successfully but the thread will now be SIGKILLed. in TEST_F()
354 /* The thread-group leader has been reaped. */ in TEST_F()
358 * Retrieve exit information for the thread-group leader via the in TEST_F()
359 * thread-group leader pidfd. in TEST_F()
365 /* The thread-group leader exited successfully. Only the specific thread was SIGKILLed. */ in TEST_F()
370 * Retrieve exit information for the thread-group leader via the in TEST_F()
371 * thread-specific pidfd. in TEST_F()
378 /* The thread-group leader exited successfully. Only the specific thread was SIGKILLed. */ in TEST_F()
382 /* Retrieve exit information for the thread. */ in TEST_F()
388 /* The thread got SIGKILLed. */ in TEST_F()
401 /* Inform the grand-parent what the tid of this thread is. */ in pidfd_info_thread_exec()
417 pthread_t thread; in TEST_F() local
434 /* The thread will outlive the thread-group leader. */ in TEST_F()
435 if (pthread_create(&thread, NULL, pidfd_info_thread_exec, &ipc_sockets[1])) in TEST_F()
438 /* Make the thread-group leader exit prematurely. */ in TEST_F()
442 /* Open a thread-specific pidfd for the thread-group leader. */ in TEST_F()
450 * We can't poll and wait for the old thread-group in TEST_F()
451 * leader to exit using a thread-specific pidfd. The in TEST_F()
452 * thread-group leader exited prematurely and in TEST_F()
456 * When the thread has execed it will taken over the old in TEST_F()
457 * thread-group leaders struct pid. Calling poll after in TEST_F()
458 * the thread execed will thus block again because a new in TEST_F()
459 * thread-group has started. in TEST_F()
473 /* Retrieve the tid of the thread. */ in TEST_F()
477 /* Opening a thread as a PIDFD_THREAD must succeed. */ in TEST_F()
481 /* Now that we've opened a thread-specific pidfd the thread can exec. */ in TEST_F()
487 /* Wait until the kernel has SIGKILLed the thread. */ in TEST_F()
492 /* The thread has been reaped. */ in TEST_F()
495 /* Retrieve thread-specific exit info from pidfd. */ in TEST_F()
500 * While the kernel will have SIGKILLed the whole thread-group in TEST_F()
508 * The thread-group leader is still alive, the thread has taken in TEST_F()
517 /* Take down the thread-group leader. */ in TEST_F()
521 * Afte the exec we're dealing with an empty thread-group so now in TEST_F()
522 * we must see an exit notification on the thread-specific pidfd in TEST_F()
523 * for the thread-group leader as there's no subthread that can in TEST_F()
535 /* Retrieve exit information for the thread-group leader. */ in TEST_F()
550 /* Inform the grand-parent what the tid of this thread is. */ in pidfd_info_thread_exec_sane()
566 pthread_t thread; in TEST_F() local
583 /* The thread will outlive the thread-group leader. */ in TEST_F()
584 if (pthread_create(&thread, NULL, pidfd_info_thread_exec_sane, &ipc_sockets[1])) in TEST_F()
588 * Pause the thread-group leader. It will be killed once in TEST_F()
595 /* Retrieve the tid of the thread. */ in TEST_F()
599 /* Opening a thread as a PIDFD_THREAD must succeed. */ in TEST_F()
603 /* Open a thread-specific pidfd for the thread-group leader. */ in TEST_F()
612 * thread-group leader will be assumed by the subthread which in TEST_F()
613 * becomes the new thread-group leader. So no exit notification in TEST_F()
629 /* Now that we've opened a thread-specific pidfd the thread can exec. */ in TEST_F()
634 /* Wait until the kernel has SIGKILLed the thread. */ in TEST_F()
639 /* The thread has been reaped. */ in TEST_F()
642 /* Retrieve thread-specific exit info from pidfd. */ in TEST_F()
647 * While the kernel will have SIGKILLed the whole thread-group in TEST_F()
655 * The thread-group leader is still alive, the thread has taken in TEST_F()
664 /* Take down the thread-group leader. */ in TEST_F()
668 * Afte the exec we're dealing with an empty thread-group so now in TEST_F()
669 * we must see an exit notification on the thread-specific pidfd in TEST_F()
670 * for the thread-group leader as there's no subthread that can in TEST_F()
682 /* Retrieve exit information for the thread-group leader. */ in TEST_F()