E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
PThread
linux下C语言多线程编程
#include #include #include #include #defineMAX10
pthread
_tthread[2];
pthread
_mutex_tmut; intnumber=0,
lifan_3a
·
2014-12-02 14:00
Linux下C多线程编程
Linux系统下的多线程遵循POSIX线程接口,称为
pthread
。编写Linux下的多线程程序,需要使用头文件
pthread
.h,连接时需要使用库lib
pthread
.a。
lifan_3a
·
2014-12-02 14:00
第十一章 线程
11.1引言11.2线程概念11.3线程标识使用函数来比较两个线程ID;Linux2.4.22使用无符号长整型标识
pthread
_t数据类型;Solaris9用
pthread
_t数据类型表示为无符号数。
hoho568
·
2014-12-02 09:00
【Cocos2d-x Lua】异步任务工具类
思路实现思路1.使用
pthread
库,封装一个用于执行异步任务的类,该类提供一个方法接受一个luafunction,然后在子线程中执行该function。
linchaolong
·
2014-12-02 09:00
c++读写锁的实现
viewplaincopyclassreadwrite_lock{public:readwrite_lock():stat(0){}voidreadLock(){mtx.lock();while(stat0已加读锁个数;0)
pthread
_mutex_wait
eric509
·
2014-12-01 18:45
c++
線程——《UNIX 環境高級編程》筆記
pthread
_t:表示線程ID。
pthread
_equal比較兩個線程ID是否相等。
不了了生
·
2014-12-01 16:00
UNIX編程
程序設計
UNIX環境高級編程
linux編程
【Linux】一个简单的线程创建和同步的例子
用到的几个函数#include //创建线程 int
pthread
_create(
pthread
_t*thread,/*线程标
cuihao
·
2014-12-01 15:00
TRACKING-BY-DETECTION in MATLAB windows下的程序调试
遇到的问题:#includeinit,Igettheerror:
pthread
.h:Nosuchfileordirectory查找了很长时间这个问题,没有解决,说这个头文件应该是在linux下的文件。
SUNSHANGJIN
·
2014-11-30 14:00
matlab
Tracking
【Cocos2d-x】
pthread
库的使用
pthread
库是一个跨平台的多线程库。在Cocos2d-x中已经集成了该库。工程配置1.包含头文件$(ProjectDir)..\..\..
linchaolong
·
2014-11-29 17:00
POSIX 多线程程序设计
目录表 摘要 译者序
Pthread
s概述 什么是线程? 什么是
Pthread
s? 为什么使用
Pthread
s?
lishenglong666
·
2014-11-27 14:00
Win32 API对多线程编程的支持--显示时间(一)
1、HANDLECreateThread(LPSECURITY_ATTRIBUTESl
pThread
Attributes, DWORDdwStackSize, L
PTHREAD
_START_ROUTINElpStartAddress
kezunhai
·
2014-11-24 17:00
多线程
createthread
哲学家吃饭
#include #include #include structchops{ intid;
pthread
_mutex_t*left,*right; }; void*philosopher(void
linbo5411
·
2014-11-22 18:00
通过线程写文件的例子
#include #include #include #include #include usingnamespacestd;
pthread
_ttid1;
pthread
_ttid2; typedefstructa_param
baijiaheizhiganmao
·
2014-11-21 15:00
C++
线程
linux
Thread测试
importjava.util.concurrent.ScheduledExecutorService;importjava.util.concurrent.TimeUnit;publicclassThreadTest{privatestaticScheduledExecutorServicetc
pthread
Pool
东门非树
·
2014-11-20 09:00
linux 多线程与信号
pthread
_kill
frommanpageNAME
pthread
_kill-sendasignaltoathreadSYNOPSIS #include int
pthread
_kill(
pthread
_tthread
lanyang123456
·
2014-11-19 16:00
一个单例的实现
GCD还提供单次初始化支持,这个与
pthread
中的函数
pthread
_once很相似。GCD提供的方式的优点在于它使用block而非函数指针,这就允许更自然的代码方式。
chenglei9128
·
2014-11-17 19:00
类
线程安全
实例
应用程序
cpp
POSIX线程库条件变量的使用——
Pthread
s线程库实例笔记4
转载:http://www.cnblogs.com/blueclue/archive/2010/07/21/1780779.html条件变量(ConditionVariables)条件变量是什么?条件变量为我们提供了另一种线程间同步的方法,然而,互斥量是通过控制线程访问数据来实现同步,条件变量允许线程同步是基于实际数据的值。如果没有条件变量,程序员需要让线程不断地轮询,以检查是否满足条件。由于线程
lanyang123456
·
2014-11-17 17:00
线程互斥与析构函数中mutex的销毁
正在实现一个线程池的
pthread
包装器,突然发现有人在讨论关于http://blog.csdn.net/Solstice/article/details/5238671 是一篇比较老的文章,考虑了下
·
2014-11-17 14:00
线程
Unix环境高级编程-11-线程
进程,线程模型线程对象线程对象拥有的域如下:线程标识,用于在一个进程中区分多个线程,所以线程标识只要求在一个进程内是唯一的即可.
pthread
中使用
pthread
_t来保存线程标识,
pthread
_self
王小伟0303
·
2014-11-16 15:00
cocos2dx 使用curl
#include"HelloWorldScene.h" #include"AppMacros.h" #include"
pthread
.h" #include"Json.h" #include"curl.h
w18767104183
·
2014-11-14 15:00
《unix高级环境编程》线程控制——线程取消选项
这两个属性影响
pthread
_cancel函数的工作。
chenhanzhun
·
2014-11-13 22:00
线程取消选项
《unix高级环境编程》线程控制——同步属性
互斥量属性 互斥量属性可以用
pthread
_mutexattr_t数据结构来进行操作,属性的初始化操作如下:/*同步属性*/ /*互斥量属性*/ /* *函数功能:初始化互斥量属性; *返回值:
chenhanzhun
·
2014-11-13 19:00
互斥量属性
读写锁属性
条件变量属性
同步属性
cocos2dx 连接php
#include"HelloWorldScene.h" #include"AppMacros.h" #include"
pthread
.h" #include"Json.h" USING_NS_CC;
w18767104183
·
2014-11-13 18:00
《unix高级环境编程》线程控制——线程属性
我们可以指定
pthread
_attr_t结构修改线程的默认属性,并把这个属性与创建线程联系起来。
chenhanzhun
·
2014-11-13 16:00
线程属性
《unix高级环境编程》线程——线程同步
互斥量 可以通过使用
pthread
的互斥接口保护数据,确保同一时间只有一个线程访问数据。互斥量本质上就是一把锁,在访问共享资源前对互斥量进行加锁,在访问完成后释放互斥量上的锁。
chenhanzhun
·
2014-11-12 21:00
线程同步
读写锁
互斥量
条件变量
Mutex and Condition variable
MutexandConditionvariableinLinux: 1 int g_value = 0; 2
pthread
_mutex_t g_
pthread
_mutex; 3
pthread
_cond_t
to myself 的分类学习日志
·
2014-11-12 17:00
ffmpeg参数全解析-即ffmpeg -h帮助说明
configuration:--prefix=e:/ffmpeg_build/r19590--enable-gpl--enable-nonfree--enable-version3--enable-
pthread
s
gyley2
·
2014-11-11 16:00
ffmpeg
使用说明
线程的主动退出机制
当然不是
pthread
_cancelhttp://www.ibm.com/developerworks/cn/websphere/library/techarticles/0804_wangyuming
yellow_hill
·
2014-11-11 15:00
gcc/g++编译知识
gcctest.c-Dx86,将会传递宏x86gcctest.c-l
pthread
-ldl,将会连接动态库
pthread
和dl。
jgj
·
2014-11-10 22:00
《unix高级环境编程》线程——线程终止
pthread
_exit 函数和
pthread
_join函数 在进程中,若调用了函数exit,_exit,或_Exit时,则该进程会终止,同样,若进程中的线程调用这三个函数时也会使线程所在的进程终止
chenhanzhun
·
2014-11-10 18:00
函数
函数
函数
函数
pthread_detach
pthread_cancel
pthread_exit
pthread_join
PHP 二维码解码 (读取二维码)
/configure--enable-
pthread
=yes--wi
liushan
·
2014-11-10 17:00
linux学习之十六---条件变量
pthread
_cond_wait
1.加锁函数:
pthread
_cond_wait(
pthread
_cond_t*cond,
pthread
_mutex_t*mutex);
pthread
_cond_timedwait(p
lanzhihui_10086
·
2014-11-09 13:00
linux学习之十六---互斥锁
1.对互斥锁初始化:静态赋值法:
pthread
_mutex_tmutex=
PTHREAD
_MUTEX_INITIALIZER;pthr
lanzhihui_10086
·
2014-11-08 22:00
多线程
linux
线程
linux学习值十四---线程终止
pthread
_exit()&
pthread
_join()
第一种通过return从线程函数返回,第二种通过调用函数
pthread
_exit()是线程退出。
lanzhihui_10086
·
2014-11-07 12:00
linux
线程
内存泄漏
pthread_join
pthread_exit
pthread
_jion
#include #include #include #include #include #pragmawarning(disable:4716) void*
pthread
_func_test(
huangzeyy
·
2014-11-06 18:00
thread
C++
linux学习之十三---多线程的创建
多线程的创建
pthread
_create()函数在Linux下线程的创建通过函数
pthread
_create来完成,该函数的声明如下:#includeint
pthread
_create(
pthread
_t
lanzhihui_10086
·
2014-11-06 16:00
thread
多线程
linux
线程
将DLL挂接到远程进程之中(远程注入)
HANDLE CreateRemoteThread( HANDLE hProcess, LPSECURITY_ATTRIBUTES l
pThread
Attributes
·
2014-11-06 02:00
dll
python多线程
python多线程 class gra
pThread
(threading.Thread): def __init__(self,conf,mbconf):
blackproof
·
2014-11-05 20:00
python
python多线程
python多线程 class gra
pThread
(threading.Thread): def __init__(self,conf,mbconf):
blackproof
·
2014-11-05 20:00
python
gcc参数-l传递顺序错误导致`undefined reference'的一点小结
刚才编译一个
pthread
的单文件程序,使用的命令行是:gcc-othread1-l
pthread
thread1.c 结果报错:1$gcc-othread1-l
pthread
thread1.
女孩不哭
·
2014-11-04 20:00
C++多线程模型与锁
而且,我还是有一个疑惑,如果上文中所说的
pthread
人不知
·
2014-11-04 11:00
多线程
C++
锁
【java多线程】线程池之GZi
pThread
package com.thread.gzip; import java.io.*; import java.util.*; public class GZipAllFiles { public final static int THREAD_COUNT = 4; private static int filesToBeCompressed = -1; public static void
追风开源
·
2014-11-03 14:00
Linux多线程
Linux多线程编程#include基本线程函数 int
pthread
_create(
pthread
_t*tid,const
pthread
_attr_t*attr,void*(*func)(void
netcake
·
2014-11-03 09:38
多线程
静态变量
互斥锁
linux多线程
线程池原理并用C语言实现
实现环境为Linux操作系统,采用C语言实现
pthread
线程的线程池。线程分配设计:线程池中的每个子线程都是等价的。我们用线程信号量来控制子线程和任务的分配问题。
liuyongvs2009
·
2014-11-01 13:24
C
Ubuntu
Multithread
pthread
_join()
void
pthread
_exit(void*retval) int
pthread
_join(
pthread
_tth,void**thread_return)
pthread
_join()的调用者将挂起并等待
chary8088
·
2014-11-01 10:00
Audio笔记之EffectChain::process_l
//MustbecalledwithEffectChain::mLocklocked voidAudioFlinger::EffectChain::process_l() { s
pthread
=mThread.promote
u010681466
·
2014-10-31 21:00
NDK-JNI-
pthread
_kill结束线程
#include #include #include #include #include #include #include
pthread
_t pid;void handle_quit(int signo
vbLittleBoy
·
2014-10-31 15:00
freetype/fterrors.h: No such file or directory
building '_imagingft' extension gcc -
pthread
-fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe
Gary__
·
2014-10-31 13:00
pthread
_cancel用法及常见问题
viewplaincopy#include #include #include #include void* func(void *) {
pthread
_setcancelstate
u012377333
·
2014-10-27 19:00
thread
linux
C语言
linux C 线程编程
*************/线程/**********************************************************************/ 在嵌入式Linux中,
pthread
For_MGP
·
2014-10-27 15:00
pthread_create
pthread_exit
pthread_join
上一页
129
130
131
132
133
134
135
136
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他