Skip to main content

Questions tagged [pthreads]

For questions related to POSIX Threads API.

0 votes
2 answers
799 views

I am working on an embedded Linux system (kernel-5.10.24). There is a multi-threaded process needed to handle a certain of exception delivered through a signal. The process is something like below. ...
wangt13's user avatar
  • 651
1 vote
0 answers
187 views

As the question title suggests: I have set max_connections = 2 in my my.cnf file, but when I activate my mysql daemon, the thread count sits at 37. I am searching online but cannot find indication my ...
user10709800's user avatar
0 votes
0 answers
378 views

I'm programming an embedded real-time Linux device with a 4 core ARM CPU. There is a requirement for a periodic computation at 10 kHz that should not jitter too much and should never be lost. My POSIX ...
Jens's user avatar
  • 1,904
0 votes
1 answer
215 views

I write some threads of my app to a Linux cpu cgroup, created by me, explicitly (let us talk e.g. about v1 for now, but if you know a way for v2, that would be also great). However, I see that ...
JenyaKh's user avatar
  • 346
3 votes
2 answers
866 views

I was writing a multi-threaded C program using pthread library. The program calls the malloc() from a thread and the main-thread. When I inspected the memory address returned by malloc(), the address ...
arka's user avatar
  • 253
0 votes
1 answer
1k views

I wrote a simple program with a thread which runs on a CPU core. It spins kind of aggressively, and it takes 100% of the CPU core. I can see that with top + 1. After N minutes, I would like to be able ...
ThreadFrank's user avatar
47 votes
3 answers
9k views

I am confused by the terminology used to describe Linux signal delivery. Most texts say things like "the signal is delivered to the process" or "the signal is delivered to the thread&...
Albert's user avatar
  • 561
0 votes
2 answers
856 views

I'm using simple-scan on Debian and it is now always crashing. It worked fine a few months ago. I suspect that something got upgraded (I'm running bullseye) and broke things. The output from simple-...
roberttheprogrammer's user avatar
0 votes
1 answer
997 views

I am trying to build 32bit versions of two programs, and both shows the same error message /usr/bin/ld: cannot find /media/34GB/Arquivos-de-Programas-Linux/Glibc-2.17-32bit/lib/libpthread.so.0 I ...
user2752471's user avatar
0 votes
2 answers
568 views

I am making an X application which contains a digital clock. The clock displays the current time in the format of "hh:mm". I want to master Xlib, so I want to use only Xlib (no other ...
user356126's user avatar
-1 votes
1 answer
92 views

I'm learning about the Linux process scheduler and have been reading through the pthread_setsched function: https://man7.org/linux/man-pages/man3/pthread_setschedparam.3.html One thing that had ...
Izzo's user avatar
  • 1,023
1 vote
1 answer
1k views

If I know the TID of an arbitrary thread that is running on my system, I can easily compute its pthread cpu clock ID. But would I be able to call clock_gettime from my program and get its CPU time? My ...
Phoenix87's user avatar
  • 131
3 votes
1 answer
1k views

My default stack size (according to ulimit -s) is 8192 kB, so naturally the code below segfaults when I try to run it. Also, naturally, it works fine if I do a 'ulimit -s 9000'. However, when I do a '...
user3856370's user avatar
1 vote
1 answer
1k views

Following are the Linux Process states; R: running or runnable, it is just waiting for the CPU to process it S: Interruptible sleep, waiting for an event to complete, such as input from the terminal D:...
Franc's user avatar
  • 309
0 votes
1 answer
538 views

I have a function that has to process all files in a set of directories (anything between 5-300 files). The number of parallel threads to be used is user-specified (usually 4). The idea is to start ...
tpb261's user avatar
  • 135

15 30 50 per page