nptl

Setting the thread /proc/PID/cmdline ?

On Linux/NPTL, threads are created as some kind of process. I can see some of my process have a weird cmdline: cat /proc/5590/cmdline hald-addon-storage: polling /dev/scd0 (every 2 sec) Do you have an idea how I could do that for each thread of my process? That would be very helpful for debugging. /me now investigating in HAL sourc...

What's the difference between GNU_LIBC_VERSION and GNU_NPTL_VERSION?

Notice these two RedHat Linux system configuration settings: $ getconf GNU_LIBC_VERSION glibc 2.3.4 $ getconf GNU_LIBPTHREAD_VERSION NPTL 2.3.4 I see they correspond to some of the TLS libraries: /lib/tls/libc-2.3.4.so /lib/tls/libm-2.3.4.so /lib/tls/libpthread-2.3.4.so /lib/tls/librt-2.3.4.so I'd like to link against these librar...

NPTL Default Stack Size Problem

Hello, I am developing a multithread modular application using C programming language and NPTL 2.6. For each plugin, a POSIX thread is created. The problem is each thread has its own stack area, since default stack size depends on user's choice, this may results in huge memory consumption in some cases. To prevent unnecessary memory us...

Linking against NPTL for pthread function pthread_condattr_setclock

I've written some pthread code that use timed waits on a condition variable but in order to ensure a relative wait I've set the condvar's clock type to CLOCK_MONOTONIC using pthread_condattr_setclock(). In order to compile and link pthread_condattr_setclock() on RHEL4, i've had to add -I/usr/include/nptl and -L/usr/lib/nptl to my gcc co...

Are there specific defines of linuxthreads and nptl

Hello I hav a programme, which must work differently for linuxthreads and nptl. Are there defines in this libs, that can be used in my programme to detect, is nptl is used or is linuxthreads is? UPDATE1: For runtime there is a getconf GLIBC_LIBPTHREADS, but what for compile-time? ...

NPTL caps maximum threads at 65528?

The following code is supposed to make 100,000 threads: /* compile with: gcc -lpthread -o thread-limit thread-limit.c */ /* originally from: http://www.volano.com/linuxnotes.html */ #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <pthread.h> #include <string.h> #define MAX_THREADS 100000 int i; void run(void) { ...