上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页
摘要: 1.定义一个任务结构体,和一个线程池结构体 struct task{ void *(*p)(void*);//需要实现的函数; void *arg;//函数所带的参数 struct task *next;};struct pthread_pool{ pthread_mutex_t mutex;//线 阅读全文
posted @ 2016-03-01 20:41 高傲的monkey 阅读(172) 评论(0) 推荐(0) 编辑
摘要: int main(){ printf("abc\n"); pid_t r = fork();//子进程从fork()的下条语句开始运行,标准答案是从fork的后半部分开始运行 if(r==0) { printf("getpid = %d\n",getpid()); printf("getppid = 阅读全文
posted @ 2016-02-23 18:14 高傲的monkey 阅读(514) 评论(0) 推荐(0) 编辑
摘要: #include<stdlib.h>#include<stdio.h>#include<malloc.h>#include<kernel_list.h>typedef struct node{ int data; struct list_head list;}listnode,*linklist; 阅读全文
posted @ 2016-02-21 15:59 高傲的monkey 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 顺序表: 声明:struct seqlist { Int last; Int data[12]; }seq,*seqlist; 初始化 seqlist init_seqlist() { seqlist sl = malloc(sizeof(seq)); sl->last =-1;//标记位,用于判断 阅读全文
posted @ 2016-02-21 13:22 高傲的monkey 阅读(2231) 评论(0) 推荐(0) 编辑
摘要: 双链表: 1 2 3 4 5 6 7 8 9 10 11 12 1 3 5 7 9 11 12 10 8 6 4 2 1。设计节点 typedef int datatyped typeddef struct node { typedata data; struct node * next; stru 阅读全文
posted @ 2016-02-20 15:08 高傲的monkey 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 单向循环链表 1。节点 typedef int datatype; typedef struct node { datatype data; struct node *next; }listnode,*linklist; 2.声明单向循环空链表,不带头结点的单向循环链表 linklist init_ 阅读全文
posted @ 2016-02-19 18:03 高傲的monkey 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 单链表: 1 2 3 4 5 6 1.设计节点 typedef int datatype; typedef struct node { datatype data; struct node *next; }listnode,*linklist; listnode a; === struct node 阅读全文
posted @ 2016-02-19 17:56 高傲的monkey 阅读(209) 评论(0) 推荐(0) 编辑
摘要: typedef struct stu { int age; char name[20]; }stu,*pstu; stu stu1;相当于struct stu stu1; pstu pstu1;相当于 struct stu *pstu1; 定义了一个结构体别名和一个结构体指针别名。 阅读全文
posted @ 2016-02-18 20:47 高傲的monkey 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 一. samba的安装: sudo apt-get insall samba 二. 创建共享目录: mkdir /home/phinecos/sharesodu chmod 777 /home/gec/share 三. 创建Samba配置文件: 1. 保存现有的配置文件 sudo cp /etc/s 阅读全文
posted @ 2016-02-18 20:08 高傲的monkey 阅读(221) 评论(0) 推荐(0) 编辑
摘要: /*练习:实现从键盘输入整数, 顺序表里面,按增长方式进行存储(输入正整数,插入数据,输入负整数,删除数据. 输入3 插入数据3 到顺序表里面;输入-3,把3数据从顺序顺删除)。 数据结构:指数据之间的相互关系包括: 1. 逻辑结构:表示数据运算之间的抽象关系 分:线性结构 和非线性结构 2. 存储 阅读全文
posted @ 2016-02-18 19:21 高傲的monkey 阅读(277) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页