httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <sorin.manola...@orange.com>
Subject thread ID
Date Thu, 01 Mar 2012 16:29:18 GMT
Hello,

I would need a memory buffer associated per worker thread (in the worker 
MPM) or to each process (in the prefork MPM).

In order to do that, I would need a map thread<->buffer. So, I would 
need a sort of thread ID/key/handle that stays the same during the 
lifetime of the thread and no two threads in the same process can have 
the same ID/key/handle.

What is the most portable way to get this thread ID?

I thought of r->connection->id. It works but it is not very portable as 
it is not guaranteed that two connections created by the same thread 
will have the same id. They do for now.

If r->connection->sbh was not opaque it would be great, because 
sbh->thread_num would be exactly what I need.

I could also use pthread_self. It works too but, in general, it is not 
guaranteed that the worker threads are pthreads.


Thank you for your help.

Sorin
_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees
et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par
erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant
susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou
falsifie. Merci

This message and its attachments may contain confidential or privileged information that may
be protected by law;
they should not be distributed, used or copied without authorization.
If you have received this email in error, please notify the sender and delete this message
and its attachments.
As emails may be altered, France Telecom - Orange shall not be liable if this message was
modified, changed or falsified.
Thank you.


Mime
View raw message