Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
在一个线程中锁定互斥体并在另一个线程中解锁它
这段代码正确且可移植吗 void aThread void while conditionA pthread mutex lock mutex1 do something pthread mutex unlock mutex2 void b
pthreads
mutex
Posix 线程问题
我试图通过示例来理解 pthreads 我编写了以下代码 每次运行时都会给出不同的答案 有人可以解释一下这个错误吗 TIA 斯维亚 代码在这里 include
c
Linux
POSIX
pthreads
从命令为 pthread 引导 symfony2
我正在尝试从 symfony 2 命令启动线程 protected function execute InputInterface input OutputInterface output parser this gt getContain
php
Multithreading
Symfony
pthreads
使用 -fPIC 编译的程序在跨过 GDB 中的线程局部变量时崩溃
这是一个非常奇怪的问题 只有当程序编译时才会出现 fPIC option Using gdb我能够打印线程局部变量 但单步执行它们会导致崩溃 thread c include
c
Linux
gcc
GDB
pthreads
并行应用程序具有随机行为
我正在编写一个 C 程序 使用 pthreads 在二维矩阵上进行波前模式计算 为了获得良好的性能 我以交错的方式将几行分配给每个线程 如下所示 线程0 线程 1 线程 2 线程 3 线程0 线程 1 线程 2 线程 3 etc 在这个计算
c
Multithreading
pthreads
parallelprocessing
pthread_create函数中的第四个参数
代码如下 int code pthread create d gt thread id attr QThreadPrivate start this which QThreadPrivate start是一个静态函数 那么 第四个参数有什么
c
pthreads
pthread_create 的钩子
是否有 在 glibc 2 5 及更新版本中 为 pthread create 定义钩子的方法 有很多二进制应用程序 我想编写一个动态库通过 LD PRELOAD 加载 我可以在 main 属性构造函数 的入口处添加钩子 但是如何强制我的代
hook
pthreads
pthread_create 不带参数?
我想创建一个没有函数参数的线程 但我不断收到严重困扰我的错误 因为我无法让一些超级简单的东西正常工作 这是我的代码 include
c
C11
pthreads
POSIX
使用 C++ 线程模拟 pthread_kill
如何使用 C 线程模拟 pthread kill 函数 我之前问过这个问题 但没有得到回应 thread native handle 函数在这里有帮助吗 所以这个问题的答案是依赖平台相关的功能并使用std thread native han
c
Multithreading
pthreads
signals
gdb:无法找到新线程:系统更新后出现一般错误
我正在 ARM 板上运行基于 OpenEmbedded 的 Linux 我的应用程序正在其中运行 我曾经运行内核 2 6 35 gdb 6 8 和 gcc 4 3 最近我将系统更新到内核2 6 37 gdb 7 4 也尝试过7 3 和gcc
GDB
pthreads
arm
2 个以上线程写入/读取变量的真正危险
同时读 写单个变量的真正危险是什么 如果我使用一个线程写入一个变量 另一个线程在 while 循环中读取该变量 并且在写入变量时读取该变量并且使用旧值 则不会有危险 这里还有什么危险 同时读 写是否会导致线程崩溃 或者当发生精确的同时读 写
c
pthreads
C++线程栈地址范围
C 标准是否提供了关于线程堆栈的非重叠性质的保证 如由一个线程启动 std thread 特别是 是否可以保证线程在线程堆栈的进程地址空间中拥有自己的 独占的 分配的范围 标准中哪里描述了这一点 例如 std uintptr t foo a
c
Multithreading
stack
pthreads
languagelawyer
OS X 上的 Pthread 和 gcc 编译问题
我有一个脚本可以在 Linux Ubuntu 11 04 上编译良好 但不能在 OS X Lion 上编译 gcc pthread o hw1 hw1 c hw1 c 22 error expected asm or attribute b
c
MacOS
gcc
compilererrors
pthreads
cmake 无法配置并出现 pthread 错误
我正在尝试使用 cmake 配置项目 但出现错误 CMakeError log中的内容如下 Change Dir home jjcasmar D libs builds sofa CMakeFiles CMakeTmp Run Build
CMake
pthreads
PTHREAD_MUTEX_INITIALIZER 与 pthread_mutex_init (&mutex, param)
有什么区别吗 pthread mutex t lock PTHREAD MUTEX INITIALIZER Or pthread mutex t lock pthread mutex init lock NULL 如果我只使用第一种方法 我
c
Ubuntu
pthreads
mutex
中止 Linux 上的阻塞读取
我在线程中运行的 Linux 中有一个阻塞读取 在程序关闭期间 我想使线程脱离此读取 不幸的是 我无法使用轮询或选择并编写正确的代码 因为读取的文件是不实现轮询 选择功能的设备驱动程序 作为临时解决方案 我当前通过 pthread kill
Linux
IO
pthreads
pthread 的条件等待
我似乎遇到了 pthreads 条件变量可能出现的死锁 这是代码 thread function for condition do work should the thread continue if exit 1 break exit f
c
pthreads
racecondition
如何从主线程唤醒休眠线程?
我有一个捕获程序 除了捕获数据并将其写入文件外 还打印一些统计信息 打印统计信息的函数 static void report void Print statistics 大约每秒调用一次 使用每秒到期的警报 所以该程序就像 void cap
c
Multithreading
pthreads
POSIX
如何使用 ZTS 编译 PHP 7.1
我在github PThread项目页面上看到支持php7 我在 ubuntu 发行版上有 php7 1 6 16 04 我找不到任何提供 php7 1 zts 的 PPA 如何在 php7 1 上启用 zts 来安装 pthreads 这
php
pthreads
ubuntu1604
php71
zts
我无法在window平台上使用pthread
我的环境是 Windows 8 1 64 位 并使用 Visual Studio 2010 我确实将所有 dll 文件放在 system32 SYSWOW64 中 因为我使用 win8 64 位 并将 x64 系统的 lib 文件与 VC
c
pthreads
pthreadswin32
«
1
2
3
4
5
6
7
...17
»