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
Tag: multithreading
QThreads using MinGw doesn’t work properly under windows
I’m developing a large optimzation tool using Qt. For a better CPU usage I use QThreads. Then I move worker objects (derived from QObject, containing non QObject data members) into the threads. Everything looks fine, builds fine and runs smoothly on Linux using GCC and Qt 4.8 However using MinGw using Qt 5.5 under Windows, the calculation took much longer.
Apache Commons Exec – sometimes a Thread can’t open a local file in Linux
WARNING — THE CAUSE IS NOT A MISSING FILE — ALL THREADS ARE CALLING THE SAME SCRIPT FILE I am starting 5-6 threads that call a local script in a Red Hat box. I’ve noticed that sometimes, I get the following error message Obviously, all processes are executing the script, so it seems to be something related to [1] OS
linux kernel: is vfs_write thread safe?
In my program, I need to write file in kernel space due to some special reason although I know it’s not recommended. I’m using vfs_write to write files in kernel space and it works fine. In one case, there are two threads need to write to the same file. From the internet, it seems that user-space write is thread safe,
How to catch new thread in gdb console mode?
I am running my Qt app from gdb, and i want to stop when new threads creates. (when gdb prints message [New Thread address (LPW number)]. I have set breakpoint b __pthread_create_2_1. That allows me to catch most of new threads prints. but i still got few new threads that are not catched. What else can i do to catch
Difference in behaviour between code executed by a pthread and the main thread in x64-assembly
When writing some x64 assembly, I stumbled upon something weird. A function call works fine when executed on a main thread, but causes a segmentation fault when executed as a pthread. At first I thought I was invalidating the stack, as it only segfaults on the second call, but this does not match with the fact that it works properly
How to create light weight kernel thread?
When I create a kernel thread (kthread_run), it becomes a new process.(I could see it using top command) . How can I create a light weight kernel thread(like the one we have in user space)? If I am not wrong, kthread_create will eventually call fork() which will call clone() with appropriate configuration to create a new process/lw process. Is it
RPi2, OpenMAX, Deadlock
Environment Raspberry Pi 2 B+ Debian Linux OpenMAX IL Use-case OpenMAX Camera Video capture Camera ports are disabled Renderer / Camera Tunnel is set All components state is set to Idle Ports are enabled Problem description The first port being enabled to the Camera Input port ( Port #73 ), the port is being enabled using the “OMX_CommandPortEnable” command, as
Why can only async-signal-safe functions be called from signal handlers safely?
I am still a little confused as to why exactly it is unsafe to receive a signal and call a non async safe function from within that signal handler. Could someone explain the reasoning behind this and possibly try and give me some references that I can follow to read up more on this myself? In other words I am