Chinaunix首页 | 论坛 | 博客
  • 博客访问: 456978
  • 博文数量: 285
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 629
  • 用 户 组: 普通用户
  • 注册时间: 2013-10-14 17:53
个人简介

相信自己,快乐每一天

文章分类

全部博文(285)

发布时间:2013-12-19 15:34:18

Posix线程中的线程属性 pthread_attr_t 主要包括scope属性detach属性堆栈地址堆栈大小优先级。在pthread_create中,把第二个参数设置为NULL的话,将采用默认的属性配置,默认值可能是:非邦定、非分离、缺省1M的堆栈、与父进程同样级别的优先级 pthread_attr_t的主要属性的意义如下:__detachstate,表.........【阅读全文】

阅读(485) | 评论(0) | 转发(0)

发布时间:2013-12-19 00:24:56

/* thread_example.c */#include #include #include #include #define MAX 10pthread_t thread[2];pthread_mutex_t mut;int num = 0;int i = -1;void *thread1(){    printf("thread1: l am thread 1\n");    for(i = 0; i < MA.........【阅读全文】

阅读(489) | 评论(0) | 转发(0)

发布时间:2013-10-31 10:14:14

将当前目录下的documents目录打包,但不希望tar占用太多CPU:nice -19 tar zcf pack.tar.gz documents这个“-19”中的“-”仅表示参数前缀;所以,如果希望赋予tar进程最高的优先级,则执行:nice --19 tar zcf pack.tar.gz documents也可修改已经存在的进程的优先级:将PID为1799的进程优先级设置为.........【阅读全文】

阅读(383) | 评论(0) | 转发(0)

发布时间:2013-10-31 10:09:45

......【阅读全文】

阅读(507) | 评论(0) | 转发(0)

发布时间:2013-10-21 16:49:23

......【阅读全文】

阅读(403) | 评论(0) | 转发(0)

发布时间:2013-10-21 16:44:20

......【阅读全文】

阅读(309) | 评论(0) | 转发(0)

发布时间:2013-10-21 15:38:52

http://www.chinaunix.net/old_jh/23/132343.htmlhttp://www.chinaunix.net 作者:hjzgq  发表于:2009-03-31 22:28:31【发表评论】 【查看原文】 【C/C++讨论区】【关闭】有关linux下进程与线程看过很多文章,我觉的.........【阅读全文】

阅读(390) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册