Skip to content

Tag: multithreading

Organize multitrheading datalogging [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I’m working on a C project for an embedded target running a Linux distribution (build with Yocto). I’m new to Linux embedded world and I

How to use SIGEV_THREAD, sigevent for linux-timer(s) expiration handling in C?

Problem: I have timer(s) running, upon expiration of timer(s) certain function needs to be invoked. Output: There is a segfault inside Hndlr() function As per man page of sigevent, it says, SIGEV_THREAD – Notify the process by invoking sigev_notify_function “as if” it were the start function of a new thread. (Among the implementā€ tation possibilities here are that each timer

output in Line A and Line B?

What would be the output in Line A and Line B? Do you think there is synchronization problem in updating the variable value? Answer Child value is 200 and Parent value is 300 always. pthread_join causes the main thread to wait until the other thread finishes executing. Both threads are acting on the same global variable. So the thread_prog thread

Multithreaded word count in C

I know I said I would try to figure it out on my own and I really did, and then I looked elsewhere first before posting here again but then I just ended up with this mess: How best should I fix this? Specifically these errors and warnings: I think the part for counting words from the buffer is okay,

Rails task not running unless rails runner has been executed in the command prompt since the linux server machine’s bootup

I’m trying to execute this task to update a large amount of data from a controller so that when an administrator user accesses this method it will run the said task. I’ve confirmed that there aren’t any issues with the task itself, but I’m not so sure about the way it’s being called. The problem I’m running into is that

Thread Program on Linux (Posix Thread)

I want to modify the multithread program on the Linux operating system using this Pthread API. I want to change that program into a program that has 2 threads that work together to add a number. But i don’t know how to change it, Thanks again for any help that can be offered. I am sorry,because I’m not good at