Skip to content
Advertisement

Tag: multithreading

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

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.

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

Design of multi-threaded server in c

When trying to implement a simple echo server with concurrent support on linux. Following approaches are used: Use pthread functions to create a pool of thread, and maintained in a linked list. It’s created on process start, and destroy on process termination. Main thread will accept request, and use a POSIX message queue to store accepted socket file descriptor. Threads

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

Advertisement