close
基本介紹可以參考

wiki;POSIX Threads

而在Linux下的多线程编程文中提到;

Linux 系统下的多线程遵循POSIX线程接口,称为pthread。编写Linux下的多线程程序,需要使用头文件pthread.h,连接时需要使用库 libpthread.a。顺便说一下,Linux下pthread的实现是通过系统调用clone()来实现的。clone()是Linux所特有的系 统调用,它的使用方式类似fork,关于clone()的详细情况,有兴趣的读者可以去查看有关文档说明。

ps. wiki : POSIX

要如何產生pthread? 請看
pthread_create - thread creation

--

pthread_create(pthread_t* _thread, pthread_attr_t* _attr, (void*) _function, (void *) _data);

_thread = Thread ID returned
_attr = The Thread Attribute
_function = The Function Pointer
_data = the pointer of the data passed to the child process

--



相關閱讀;

[Linux] 關於 pthread_create 問題

Linux pthread_create 如何设置 线程的detach 状态
arrow
arrow
    全站熱搜

    tttt 發表在 痞客邦 留言(0) 人氣()