腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
在进程(而不是线程)中使用semaphore.h
c
、
process
、
fork
、
parent-child
、
semaphore
我有这样的代码:#include <unistd.h>#include <sys/shm.h>#include <sys/types.h> int segment_n; int *shared_n; int pid_int;
浏览 1
提问于2013-06-20
得票数 0
回答已采纳
2
回答
对裸机使用
pthread
的交叉编译程序
embedded
、
arm
、
xilinx
、
bare-metal
我有一个用于ARM的交叉编译工具链( SoucereyCodeBench -xilinx-
linux
-gnueabi-)。我交叉编译了一个使用编译器选项的
库
:-DSC_INCLUDE_FX -DSC_USE_PTHREADS -pthreads -fPIC -DPIC 所以,如果我想使用裸机程序的
库
,我想我需要
pthread
那么,可以为裸机编译
pthread
吗?
浏览 1
提问于2013-06-13
得票数 0
回答已采纳
1
回答
使用c++线程时出现错误
c++
、
multithreading
pthread
_t getFocus;
pthread
_join ( getFocus, NULLvoid *returnFocus ( void *argument ) {}undefined reference to _imp__
pthread
_createundefined reference to _imp__
pthread</em
浏览 3
提问于2014-06-17
得票数 0
1
回答
链接
pthread
库
问题
c
、
linux
、
makefile
、
pthreads
、
undefined-reference
-lclient -ldl -
pthread
ar rcs libclient.a libclient.o client.olibclient.o:libclient.c client.o: client.c gcc -Wall -fPIC
浏览 0
提问于2011-09-14
得票数 8
回答已采纳
1
回答
为什么我会得到对
pthread
_mutexattr_settype的未定义引用?
c
、
linux
、
gcc
、
shared-libraries
、
linker-errors
我正在尝试编译和链接Novell LDAP C SDK中的一个示例文件,但由于
pthread
库
中有3个未解析的符号,链接失败。我在Ubuntu 13.10 (Saucy)上用的是gcc 4.8.1。我已经在命令行中正确地包含了
pthread
库
作为最后一个
库
,但是这些特殊的符号仍然没有被解析。of
pthread
_mutexattr_settype<br> /lib/i386-
linux
-gnu/libpthread.so.0:
浏览 5
提问于2014-03-05
得票数 15
1
回答
在arm机器上构建ruby 1.9.2时出错
ruby
、
configure
、
arm
我正在尝试在运行arm-
linux
的synology diskstation上从源代码构建ruby 1.9.2。dev-tools已安装,头文件和
库
文件也已安装。当我运行./configure
pthread
时找不到checking for
pthread
_kill in -lpthread据我所知,
pthread
库
是存在的 > locate
pthread</e
浏览 2
提问于2011-10-25
得票数 2
3
回答
NPTL和POSIX线程之间有什么区别?
linux
、
pthreads
、
posix
、
nptl
NPTL和POSIX线程之间的基本区别是什么?这两个人是怎么进化的?
浏览 5
提问于2011-12-20
得票数 29
回答已采纳
2
回答
要使用什么
库
来避免对`
pthread
_atfork的未定义引用
reference
、
undefined
即使在使用
pthread
库
之后,我也得到了对`
pthread
_atfork的未定义引用。有没有针对这个的单独的
库
?
浏览 2
提问于2010-03-04
得票数 1
1
回答
我想写一个由python调用的c++共享
库
。
python
、
c
、
shared-libraries
、
ctypes
生成'.dll‘共享
库
import ctypes#include <
pthread
.h> printf("Hello, World!(0);
pthread
_t p1;
pthr
浏览 0
提问于2021-04-06
得票数 0
5
回答
如何从任意
pthread
_t中获得线程ID?
c
、
linux
、
unix
、
pthreads
、
system-calls
我有一个
pthread
_t,我想改变它的CPU亲和力。问题是我使用的是glibc2.3.2,它没有。不过,这是可以的,因为
pthread
_setaffinity_np()本身就是的包装器,可以通过传递线程ID而不是进程ID来调用该包装,以设置任意线程的关联。 但是 ..。--这与不透明类型
pthread
_t不同,gettid()只返回当前线程的线程id。我需要能够设置任意线程的CPU关联。不幸的是,我无法访问p线程的私有部分,这将允许我通过将
pthread
_t转换为struct
pthread
*来窃取线
浏览 6
提问于2009-02-17
得票数 45
回答已采纳
1
回答
几个OpenMP编译器如何创建线程?
openmp
但是也许他们使用了一些
库
,比如
pthread
..?
浏览 0
提问于2011-06-16
得票数 0
回答已采纳
15
回答
Linux
中对
pthread
_create的引用未定义
c
、
linux
、
multithreading
、
pthreads
我从网站上拿到了下面的演示#include <stdio.h>
pthread
_exit(NULL);{
浏览 0
提问于2009-11-03
得票数 479
1
回答
支持g++和c++0x规范
c++
、
gcc
、
g++
、
c++11
虽然有人说g++对c++0x新功能的支持还处于实验模式,但许多开发人员gcc表示,你可以在代码中使用大多数新功能,让程序正常工作。#include <thread>{} { t.join();g++ -s
浏览 1
提问于2010-04-19
得票数 12
回答已采纳
2
回答
在
linux
文件夹中找不到
pthread
.c
c
、
linux
、
kernel
我在
Linux
-2.6.32.28中找到了
pthread
.c,但在
Linux
-2.6.32.28和
Linux
-4.7.2/Kernel中找到了Kthread.c。查找
pthread
.c在我安装Ubuntu时附带的Computer/usr文件夹中找到
pthread
.c文件,但
pthread
.c在下载的文件夹
Linux
-2.6.32.28、
Linux
-3.13、
Linux
1.系统调用2.
库</
浏览 10
提问于2017-11-15
得票数 2
6
回答
gcc的-lpthread选项
gcc
、
pthreads
据我所知,如果我想在
linux
环境中使用
pthread
库
,我必须包含
pthread
.h并使用-lpthread选项编译源代码。但是我不明白为什么我要用-lpthread选项编译。因为我已经声明了要包含
pthread
.h头文件,以便让gcc链接
pthread
库
。为什么gcc不通过读取#include自动链接
pthread
库
文件? 提前谢谢。
浏览 30
提问于2012-02-18
得票数 14
回答已采纳
2
回答
如何解决BOOST Log 1 .72的链接错误?
c++
、
logging
、
boost
、
linker
我有一个源代码
库
,它适用于两个平台/编译器:包含路径和
库
路径是我的项目配置的一部分问题:如何解决windows 的链接器错误 问题:如何构建
浏览 7
提问于2020-10-30
得票数 0
1
回答
pthread
_create()在260个线程后失败
linux
、
multithreading
、
glibc
我有大约500个线程,我想让它们同时运行。我读到默认的glibc只允许大约300个线程同时运行。他们是怎么得到这个数字的?(我使用的是32位系统)
浏览 1
提问于2014-03-18
得票数 0
2
回答
linux
中的C++线程
c++
、
linux
、
multithreading
我正在尝试用
Linux
创建一个多线程的c++程序。我以前在windows上用过
pthread
库
,但我听说它不是
Linux
的标准。你对
Linux
下的c++有什么线程
库
的建议?编辑:我错误地认为
pthread
不是
linux
原生的,正如我所说的,这是我不久前听到的。我主要在寻找各种线程选项的效率之间的比较,特别好奇的是关于c-11线程
库
与我以前使用的
pthread
的性能的信息。我被误导了,所以我发布了这个问题以获得更多的信
浏览 4
提问于2013-06-09
得票数 3
回答已采纳
1
回答
无法编译带有链接在Ubuntu上的SDL
库
的文件
c
、
linker
、
sdl
我们有一个任务来编译带有SDL
库
链接的文件。文件本身不应该包含任何错误,因为几乎每个人都能编译它。
浏览 1
提问于2013-11-30
得票数 0
回答已采纳
3
回答
共享内存中的std::mutex不工作
c++
、
multithreading
、
mutex
、
shared-memory
、
stdmutex
我有一个场景,共享内存区由两个不同的进程独占访问。当我启动进程时,第一个进程成功地锁定了互斥锁,更新了内存,并解锁了互斥锁。但我观察到,当第二个进程试图锁定它时,它仍然处于死锁状态,等待互斥锁解锁。我使用的是std::mutex。请告诉我我错过了什么。
浏览 51
提问于2017-10-10
得票数 4
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
数据库与Linux
鸿蒙内核标准库与linux标准库的差异
Linux上安装MySQL数据库
C语言服务器编程必备常识
Linux系统编程 读写锁rwlock
热门
标签
更多标签
云服务器
ICP备案
对象存储
实时音视频
即时通信 IM
活动推荐
运营活动
广告
关闭
领券