Skip to content
Advertisement

Tag: pthreads

C++ pThread program isn’t running to completion [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 years ago. Improve this question I’m having an odd issue where my C++ multithreaded program doesn’t run to

PHP pthreads failing when run from cron

Ok, so lets start slow… I have a pthreads script running and working for me, tested and working 100% of the time when I run it manually from the command line via ssh. The script is as follows with the main thread process code adjusted to simulate random process’ run time. So while the above script will run via a

pthread not waiting for mutex lock threadFinished

Hi below is my coding snippet When statement1 & statement2 are commented I am expecting child thread to change my testrunning variable first before main thread but it is working properly only when statement1 and statement2 are uncommented. My question is why in child thread mutex lock is not locking my testrunning variable . it is allowing main thread to

fwrite fopen blocking threads

I have a multithreaded linux app written in c running on a i.mx6 arm. I have a 25lc256 spi eeprom mapped to the file system. Writes are relatively slow at the driver level, not much can be done there. The problem is that file functions are blocking other threads for too long. usleep additions don’t seem to help, it appears

Linux scheduling. (pthreads)

I’m trying to play around with threads and so far, with the code below, I’m doing fine. I want also want to print the current index of the executing thread but I’ve encountered some problems. I’m trying to print the current executing thread along with “Hello world!”. But, the output is this… So far, I’ve already tried issuing What can

Get/Set the pthread scheduling policy in Linux

The code below is a sample provided by the book in my Operating Systems course. When compiling it I get the error shown below it. I compiled it using this command… However, I get this error. I tried adding -pthread: but the error remains. Thanks for your help! Answer You have the correct compiling command: but you need to put:

Advertisement