mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-08 08:26:14 +00:00
21 lines
298 B
C
21 lines
298 B
C
#include <pthread.h>
|
|
#include <unistd.h>
|
|
|
|
static void *th(void *v)
|
|
{
|
|
sleep(1);
|
|
pthread_exit(0);
|
|
}
|
|
|
|
int main()
|
|
{
|
|
pthread_t a;
|
|
|
|
pthread_create(&a, NULL, th, NULL);
|
|
pthread_create(&a, NULL, th, NULL);
|
|
pthread_create(&a, NULL, th, NULL);
|
|
pthread_create(&a, NULL, th, NULL);
|
|
|
|
pthread_exit(0);
|
|
}
|