线程执行顺序之一

一般情况下,线程在主函数创建,函数分配在栈区,遵循先进后出规则,先创建后运行 #include <stdio.h> #include <unistd.h> #include <pthread.h>   int var  = 8;   void *thread_1(void *arg) {     while(1)     {         printf("this is my new threa
相关文章
相关标签/搜索