tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r543419 - /tomcat/connectors/trunk/jk/native/common/jk_util.c
Date Fri, 01 Jun 2007 08:19:48 GMT
rjung@apache.org wrote:
> Correct pthread_t casting in jk_gettid().
> Needed at least on Mac OS X,
> shouldn't hurt on other platforms.
> 
> -    int tid = (int)(t & 0xFFFF);
> +    int tid = ((int)t) & 0xFFFF;

Since thread id is a pointer, think it can even be
rounded to the sizeof t
Something like ((int)t / align(sizeof t)) & 0xffff

Anyhow, it's used only for logging to have an idea
from which threads in worker mpm's the logs are coming,
so the accuracy is not important.

Regards,
Mladen.






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message