上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 65 下一页
摘要: 字符串数组是指针数组,需要使用二级指针 #include "stdafx.h" #include <stdio.h> #include <string.h> const char* str[] = { "Hello","abc","applef","man","C程序设计","指针数组" }; co 阅读全文
posted @ 2020-04-06 15:47 卷哭你 阅读(2035) 评论(0) 推荐(0) 编辑
摘要: http://www.tiaozhanbei.net/focus 阅读全文
posted @ 2020-04-06 13:17 卷哭你 阅读(79) 评论(0) 推荐(0) 编辑
摘要: (1) 线程系统的三个基本要素:执行环境,调度,同步。 同步: 使用互斥量来保护共享数据,使用条件变量来通信,使用条件变量来通信,其他同步机制,如信号量管道和消息队列。互斥量允许线程在访问共享数据 锁定他,以避免其他线程干扰。条件变量允许线程等待共享数据到达某个期望的状态。(队列非空或者资源可用) 阅读全文
posted @ 2020-04-06 11:53 卷哭你 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 使用c库操作文件 #include "stdafx.h" #include <stdio.h> #include <pthread.h> #include <assert.h> #include <windows.h> #include <string.h> static void* Functio 阅读全文
posted @ 2020-04-06 11:30 卷哭你 阅读(556) 评论(0) 推荐(0) 编辑
摘要: 我们写的代码最终都要编译成为二进制程序,然后这个程序放到内存里面去。 和多进程比较一下 区别 阅读全文
posted @ 2020-04-05 22:44 卷哭你 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 进程和线程调度理解,就是操作系统让线程或者进程进入生命周期各种状态。 隐形的手。 阅读全文
posted @ 2020-04-05 22:08 卷哭你 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 设备号 进程号 线程号 姓名 万物有个名字 万物通过名字来进行识别 多个同样性质的东西。 阅读全文
posted @ 2020-04-05 21:29 卷哭你 阅读(266) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include <pthread.h> #include <stdio.h> #include <windows.h> #include <stdio.h> //#include <assert.h> int main(int argc, _TCHAR *a 阅读全文
posted @ 2020-04-05 17:41 卷哭你 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 系统调用的函数api头文件 kernel\include\uapi\asm-generic #include <unistd.h> #include <sys/syscall.h> #include <sys/types.h> #include <signal.h> #include <stdio. 阅读全文
posted @ 2020-04-05 17:02 卷哭你 阅读(162) 评论(0) 推荐(0) 编辑
摘要: IO就是读数据或者写数据 包含一个时间概念在里面 包含一个system概念 读数据的策略 阻塞和非阻塞时设备访问的两种基本形式。使用这两种形式,驱动程序可以灵活地支持阻塞和非阻塞的访问。select函数底层实现,里面实现用就是等待队列。 阻塞调用时指调用结果返回之前,当前线程挂起。函数只有得到结果之 阅读全文
posted @ 2020-04-05 15:44 卷哭你 阅读(1965) 评论(0) 推荐(0) 编辑
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 65 下一页