Category "pthreads"

I’m trying to sum the return value of 2 threads together but it return -1 saying error

I’m trying to make a program which sums the numbers in an array, the first half of the array by the first thread and the second half by the second thread

Can using volatile affect the behavior of simple property checking system?

I'm maintaining a project where someone has suggested that we make some variables volatile. I'm trying to understand if it's needed at all (or could be needed).

asio::thread created in object with global scope causes strange behavior, but not if it is created in main

I have been battling a problem for a day or so and "solved" it but I wonder if anyone knows why it must be so, or whether I have just hacked my way around a dee

Shared pthread_cond_broadcast stuck in futex_wait

I have one "server" process a and potentially multiple "client" processes b. The server creates a shared memory file (shm_open) containing a pthread_mutex_t and

does pthread_join affects concurrently

I want to run all threads concurrently. If I use pthread_join function does it affect running of threads concurrently? pthread_join(..)

PThreads is not providing a program speedup over serial code

I am creating 2 programs to test the differences in run time of serial matrix multiply vs that of parallel matrix multiply. The parallel code that I have writte

A pthread with SCHED_RR and higher real time priority failed to preempt a kthread in kernel module with lower priority

Preface: I have two threads: one kernel thread and one userspace pthread. I assume pthread set to SCHED_RR with higher rt priority should preempt a kthread with

C Producer-Consumer Using PThreads

I am working on a problem where I am implementing a program that mimics the producer-consumer paradigm. The code that I am using works when I only have one prod

Creating multiple threads in C

I am just a beginner in Programming using C.For my college project I want to create a multi-threaded server application to which multiple clients can connect an

GCC: Building cross-compiler for ARM - pthread.h not found

Using a Ubuntu 12.04 host, I carefully followed this SO answer here (Recipe for Compiling Binutils and GCC Together) to build GCC and binutils in one tree with