The kernel doesn't have pthread support - glibc emulates it using clone().
Shouldn't glibc then not also be the one to do the getpid() / gettid()
switching internally only for applications linked agains libpthread ?
If you want to have thread IDs I think you should go all the way
and make thread groups a real entity like sessions and process groups.
Setsid() would reset the thread group ID like it now also resets
the process group ID. Ditto for setpgrp() I think. A session can
contain several process groups which can contain several thread groups.
There should be a way to signal all processes in a thread group-
perhaps that should even be the default, a signal to any process
in the group should be delivered to all of them. Or perhaps only
for SIGSTOP and SIGKILL, all other signals could be delivered
to the thread group leader.
Anyway, food for thought.
Mike.
-- Move sig.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/