Michael Felt <aixto...@felt.demon.nl> added the comment: On 22/05/2019 15:15, Jake Tesler wrote: > Jake Tesler <jake.tes...@gmail.com> added the comment: > > I will look into whether adding thread_self() for AIX would be simple enough > for this PR. > > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue36084> > _______________________________________ > Blush. Maybe I should have read further (to chapter T)
Here is a bare bones example - showing the pthread_self() is not the right value, but thread_self is. michael@x071:[/data/prj/aixtools/tests/posix]cat thread*.c #include <pthread.h> #include <sys/thread.h> #include <stdio.h> main() { pid_t pid; tid_t tid; pthread_t ptid; pid = getpid(); tid = thread_self(); ptid = pthread_self(); fprintf(stderr,"thread_self: pid:%d tid:%d ptid:%d\n", pid, tid, ptid); sleep(300); /* give time to run ps -mo THREAD */ } michael@x071:[/data/prj/aixtools/tests/posix]./thread_self thread_self: pid:*4129010 *tid:*23724099 *ptid:1 michael@x071:[/data/prj/aixtools/tests/posix]ps -mo THREAD USER PID PPID TID S CP PRI SC WCHAN F TT BND COMMAND michael 3408006 7012502 - A 3 61 1 - 200001 pts/0 -1 ps -mo THREAD - - - 22282455 R 3 61 1 - 400000 - -1 - michael *4129010 *7012502 - A 0 60 1 f1000a03e16533b0 8200011 pts/0 -1 ./thread_self - - - *23724099 *S 0 60 1 f1000a03e16533b0 410400 - -1 - ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36084> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com