ChinaUnix.net
相关文章推荐:

pthreadcreate thread當掉

请问power 架构中的thread是什么,比如Power7 有32个threads ? 求指点!

by embeddedlwp - 服务器及硬件技术 - 2012-02-07 18:10:18 阅读(1195) 回复(2)

相关讨论

fork()函数,Linux系统调用   头文件:   #include   函数定义:   int fork( void );   返回值:   子进程中返回0,父进程中返回子进程ID,出错返回-1   函数说明:   一个现有进程可以调用fork函数创建一个新进程。由fork创建的新进程被称为子进程(child process)。fork函数被调用一次但返回两次。两次返回的唯一区别是子进程中返回0值而父进程中返回子进程ID。   子进程是父进程的副本,它将获得父进程数据...

by bingqi17 - Linux文档专区 - 2008-12-28 18:07:40 阅读(565) 回复(0)

A thread may be created as a joinable thread (the default) or as a detached thread. A joinable thread, like a process, is not automatically cleaned up by GNU/Linux when it terminates. Instead, the thread's exit state hangs around in the system (kind of like a zombie process) until another thread calls pthread_join to obtain its return value. Only then are its resources released. A detached thread,...

by dybbuk - Linux文档专区 - 2007-06-20 22:17:08 阅读(535) 回复(0)

本帖最后由 zhuizhuziwo 于 2010-12-04 14:15 编辑 what a fucking day.there is no chinese in this system.so i use english. sorry. I have written a program with two threads. but it has some errors.[code] #include #include #include #include thread.h> #include #include #define MAX_LINE_LEN 256 //the second thread. void * Firstthread(void *...

by zhuizhuziwo - Linux环境编程 - 2010-12-06 13:28:45 阅读(1348) 回复(3)

thread Lifecycle:A new threads are created with thread.new. You can also use the synonyms thread.start and thread.fork. There is no need to start a thread after creating it, it begins running automatically when CPU resources become available. The thread class defines a number of methods to query and manipulatethe thread while it is running. A thread runs the code in the blockassociated with the c...

by shijiang1130 - Ruby - 2010-01-29 16:19:34 阅读(3749) 回复(1)

POSIX thread 一 概述       Pthread是一套通用的线程库, 它广泛的被各种Unix所支持, 是由POSIX提出的. 因此, 它具有很好的可移植性.  例1:     /**/     #include pthread.h>     void *pp(void *arg)     {         while (1) { ...

by Arthursky - BSD文档中心 - 2009-04-14 09:12:58 阅读(1426) 回复(0)

结构就是起两个线程 一个做server 一个做client 通过本地的8888的端口 #include thread.h> #include #include #include #include #include #include #include #include #include #include volatile int RecvFD = 0; volatile int SendFD = 0; volatile int RecvSD = 0; volatile int ...

by senic - C/C++ - 2008-09-08 10:11:03 阅读(1899) 回复(2)

有人在windows下用过这个模块吗?为什么用threds模块可以实现多线程,但使用use thread;就总是报错!下面是用thread::Pool模块时报的错: Undefined subroutine &threads::new call at C:/Perl/site/lib/thread/Pool.pl line 110 我也单独试了,用thread模块,启动不了多线程!麻烦大家给分析一下!下面是thread模块的一个小例子,大家看看哪里错了! #!c:\perl\bin\perl -w use thread; my @threads; my @info; $info[0]="1";...

by qiqi562877 - Perl - 2011-02-08 02:37:25 阅读(3487) 回复(6)

贴子已过期 [ 本帖最后由 polo1 于 2007-5-3 19:27 编辑 ]

by polo1 - PHP - 2007-05-03 12:57:24 阅读(1267) 回复(1)

#ifdef HAVE_CONFIG_H #include ; #endif #include ; #include ; #includethread.h>; struct student { char name; int num; } void hello(void*arg) { struct student *student2; student2=(struct student *)arg; (*student2).name; pthread_exit(0); } main() { pthread_t tid; struct student*student1; (*student1).name='h'; (*student1).num=2; ...

by lrh_0_2000 - C/C++ - 2005-09-12 19:36:39 阅读(1139) 回复(6)