You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2010/12/08 20:07:41 UTC
svn commit: r1043611 - /tomcat/native/trunk/native/src/poll.c
Author: costin
Date: Wed Dec 8 19:07:41 2010
New Revision: 1043611
URL: http://svn.apache.org/viewvc?rev=1043611&view=rev
Log:
Javadoc for Poll.create() describes ENOTIMPL error if THREADSAFE is requested but not supported.
The old code was silently removing THREADSAFE flag, java side wouldn't have any way to know if it
needs to wait or can modify the poll set from a different thread.
Modified:
tomcat/native/trunk/native/src/poll.c
Modified: tomcat/native/trunk/native/src/poll.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1043611&r1=1043610&r2=1043611&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/poll.c (original)
+++ tomcat/native/trunk/native/src/poll.c Wed Dec 8 19:07:41 2010
@@ -120,9 +120,9 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)(
if (f & APR_POLLSET_THREADSAFE) {
apr_status_t rv = apr_pollset_create(&pollset, (apr_uint32_t)size,
p, f);
- if (rv == APR_ENOTIMPL)
- f &= ~APR_POLLSET_THREADSAFE;
- else if (rv != APR_SUCCESS) {
+ // Pass the ENOTIMPL to java, as described in javadocs. Java must clean the
+ // flag, will know it's not supported.
+ if (rv != APR_SUCCESS) {
tcn_ThrowAPRException(e, rv);
goto cleanup;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1043611 - /tomcat/native/trunk/native/src/poll.c
Posted by Mladen Turk <mt...@apache.org>.
On 12/08/2010 08:07 PM, costin@apache.org wrote:
> Author: costin
> + // Pass the ENOTIMPL to java, as described in javadocs. Java must clean the
> + // flag, will know it's not supported.
.c file and c++ style comment ???
Welcome to the beautiful land of native code, Costin :)
Cheers
--
^TM
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org