#import "ViewController.h"

#import <pthread.h> //1.需要包含这个头文件

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {

[super viewDidLoad];

//2.创建线程对象

pthread_t p;

//3.创建线程

/*

参数1 : pthread_t  _Nullable *restrict _Nonnull, 线程对象,传递地址

参数2 : const pthread_attr_t *restrict _Nullable, 线程属性 , NULL

参数3 : void * _Nullable (* _Nonnull)(void * _Nullable), 指向函数的指针

参数4 : void *restrict _Nullable, 函数需要的参数

*/

pthread_create(&p, NULL, task, NULL);

}

void *task(void *pama){

return NULL;

}

@end

最新文章

  1. maven环境配置+eclipse环境配置
  2. Linq专题之创建Linq查询表达式
  3. C# - Dbhelp
  4. python模拟http请求
  5. about mobile web
  6. diy 电脑 重装系统
  7. #include &lt;locale.h&gt; #include &lt;locale&gt;
  8. MVC-04 视图(1)
  9. python--help
  10. Route@简单应用
  11. Nignx入门location、root配置
  12. Expected MultipartHttpServletRequest: is a MultipartResolver configured解决方案
  13. 2017 Multi-University Training Contest - Team 1 1006&amp;&amp;HDU 6038 Function【DFS+数论】
  14. 【BZOJ3680】吊打XXX(模拟退火)
  15. Mysql之库表操作(胖胖老师)
  16. latex中长公式换行,很好的办法
  17. 舵机&amp;数据处理&amp;stm32内存之堆栈溢出(遇到的问题)
  18. rediret 加/与不加/的区别
  19. sqlserver数据库不能重命名报错5030
  20. asynchronous.js

热门文章

  1. SSL 链接安全协议的enum
  2. 趣味编程:静夜思(Python版)
  3. [PHP]防止表单重复提交的几种方法
  4. 关于T-SQL中exists或者not exists子查询的“伪优化”的做法
  5. [图解tensorflow源码] 入门准备工作附常用的矩阵计算工具[转]
  6. Out of range value for column &#39;phon&#39; at row 1
  7. Python中struct.pack()和struct.unpack()
  8. soap 简单调用其他系统的函数
  9. HashMap、LinkedHashMap、ConcurrentHashMap、ArrayList、LinkedList 底层实现
  10. QPS/TPS/并发量/系统吞吐量的概念