Subj : Re: Linux NPTL anomally To : comp.programming.threads From : David Schwartz Date : Wed Sep 28 2005 03:21 am wrote in message news:1127897471.732373.140130@g49g2000cwa.googlegroups.com... > I have a multi threaded app. The app is running and all the threads > have started and are sleeping. The main process calls a function in a > kernel module that among other things, registers the main processes pid > via "pid = current->pid". Later at program exit time, the main > sequentially causes all the threads to exit. Then in during some > cleanup code, calls another function in that same kernel module and > again registers his process id via "pid = current->pid". The anomally > is, this last "current->pid" does not have the main process id. It has > the tid of one of my threads that has long since exited. Not only have > all my threads exited, none of them calls or has called any function > within in this kernel module. ???? > I understand (sort of) the differences between LinuxThreads and NTPL > but they do not explain this anomally. Bug?? Sounds like either a bug in the kernel module or a bug in the way you are using it. It is documented to allow it to be called by a different thread than cleans it up? DS .