ChinaUnix.net
相关文章推荐:

pthread_attr_t

如何man到pthread_create的const pthread_attr_t *restrict attr文档。 man pthread_create看不到attr的说明,想了解下attr有几种情况。请问如何man。

by cxytz01 - C/C++ - 2013-04-10 10:56:30 阅读(1668) 回复(1)

相关讨论

在linux下编程时,在哪里查询像pthread_attr_t, sched_param,等这种系统定义的结构的定义, 有什么手册码?

by gongbei - Linux环境编程 - 2007-12-05 22:07:21 阅读(7961) 回复(1)

一般来说应该设置堆的大小为多少? 以什么为依据呀?谢谢!

by lv_bin98 - C/C++ - 2009-08-24 14:30:29 阅读(2251) 回复(0)

#include <pthread.h> #include #include int main(void) {         pthread_attr_t attr;         int error;         if ((error = pthread_attr_init(&attr)) != 0) {                 fp...

by fcloudf - C/C++ - 2007-07-23 17:30:11 阅读(2215) 回复(1)

pthread_attr_init源码在哪里找到?在内核源码中没有搜索到

by fedorayang - 内核源码 - 2012-07-17 13:26:22 阅读(1074) 回复(1)

我想通过pthread_attr_getstack来得到线程的默认属性值 但是得到的结果比较奇怪 有高手帮忙可以分析一下吗? 怎么stackaddr是0,stacksize也是0? 难道是pthread_create的时候临时申请的吗? 我写了一个pthread_create 测试了一下还是这个结果哦 [code] pthread_attr_t attr; void *stackaddr; size_t stacksize; pthread_attr_init(&attr); pthread_attr_getstack(&attr,&stackaddr,&stacksize); printf("statck address = %p st...

by cuer_2 - Linux环境编程 - 2013-01-05 16:02:52 阅读(3868) 回复(4)

#include #include #include<pthread.h> void* task1(void*); void* task2(void*); int main() { pthread_t pid1, pid2; pthread_attr_t attr; int ret; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, pthread_CREATE_DETACHED); pthread_create(&pid1, &attr, task1, NULL); ret=pthread_join(pid1, NULL); printf("ret=%d\n", ret); pthread_attr_se...

by berniechen - Linux环境编程 - 2008-09-12 13:00:04 阅读(14512) 回复(4)

有2问题: 1.pthread_attr_getstack()在设置堆栈大小之前获取不到堆栈大小值。而pthread_attr_getstacksize却可以. 2.APUE2上有这么一句话: Also, if we change the stackaddr thread attribute, the system assumes that we will be managing our own stacks and disables stack guard buffers, just as if we had set the guardsize thread attribute to 0. 我自己的理解是:修改了堆栈地址时,会在内部(可能是系统调用内部?)...

by wliang511 - C/C++ - 2008-10-17 10:30:31 阅读(3959) 回复(3)

pthread_attr_t attr; int pocily; int ret; pthread_attr_init(&attr); if (ret =pthread_attr_setschedpolicy(&attr, SCHED_FIFO)) { printf("set ched policy failed -- %s \n", strerror(ret)); return -1; } if (pthread_attr_getschedpolicy(&attr, &pocily)) { printf("set ched policy failed -- %s \n", strer...

by makeclear - C/C++ - 2008-06-06 09:17:14 阅读(10266) 回复(18)

如果不是root 则会调用出错。 哪位知道这个问题?

by j1j1h1 - 嵌入式开发 - 2007-10-18 17:50:09 阅读(1875) 回复(0)

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/35079/showart_269852.html

by lsmup - Linux文档专区 - 2007-04-02 21:56:45 阅读(613) 回复(0)