hello.c
来自「Pthreads是Intel开发的Linux下的多线程编译工具」· C语言 代码 · 共 25 行
C
25 行
#include <stdio.h>#include <pthread.h>#define NUMTHREADS 4void *helloFunc(void *pArg) { printf("Hello Thread\n"); }main() { pthread_t hThread[NUMTHREADS]; for (int i = 0; i < NUMTHREADS; i++) pthread_create(&hThread[i], NULL, helloFunc, NULL); for (int j = 0; j < NUMTHREADS; j++) pthread_join(hThread[j], NULL); return 0; }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?