Discussion:
[omniORB] in case of POLLERR
Masaaki Sekiya
2008-11-27 18:13:39 UTC
Permalink
Hi.
I can't get any comments before. so now I've posted again.

orbcore/tcp/tcpAddress.cc :L261-264 is as below.

int rc = poll(&fds,1,timeout);
if (rc > 0 && fds.revents & POLLERR) {
rc = 0;
}

Why is "rc" set to 0 , when poll results in POLLERR ?
The value of "rc" equals zero means poll resulted in timeouts.
I think setting "rc" to zero without timeouts causes
many loop without system idle and huge CPU consumption.
Is it no problem ?

It is related to e-mail:[Subject: Remote methods blocks]
which I posted before.

Thanks
Duncan Grisby
2008-12-29 21:12:47 UTC
Permalink
Post by Masaaki Sekiya
I can't get any comments before. so now I've posted again.
orbcore/tcp/tcpAddress.cc :L261-264 is as below.
int rc = poll(&fds,1,timeout);
if (rc > 0 && fds.revents & POLLERR) {
rc = 0;
}
Why is "rc" set to 0 , when poll results in POLLERR ?
The value of "rc" equals zero means poll resulted in timeouts.
I think setting "rc" to zero without timeouts causes
many loop without system idle and huge CPU consumption.
Is it no problem ?
Sorry for the long delay. Yes, it is a bug, which only occurs on
platforms where recv() cannot be interrupted by closing the socket.
I've fixed it in CVS by changing the code to set rc = RC_SOCKET_ERROR
rather than 0.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Masaaki Sekiya
2009-01-05 17:03:59 UTC
Permalink
Hi.
I got source files from CVS and compiled them.
But compilation errors occurs as below.

-------
aCC -AA +DD64 -g -D_REENTRANT -D_RWSTD_MULTI_THREAD -D_RW_MULTI_THREAD -
D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L -DHP11 -D_HPUX_SOURCE -
D__HPACC_TRICTER_ANSI__ -D_HP_NAMESPACE_STD -c -O -w +inst_v -mt -I.. -I.
/.. -I../../../../include/omniORB4/internal -I../../../../include/
omniORB4/internal -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -
DUSE_omniORB_logStream -D_OMNIORB_LIBRARY -DOMNIORB_VERSION_STRING='"4.1.
3"' -DOMNIORB_VERSION_HEX='0x040103F1' -DCONFIG_DEFAULT_LOCATION='"/etc/
omniORB.cfg"' -DCONFIG_ENV='"OMNIORB_CONFIG"' -DUnixArchitecture -I. -I.
-I../../../../include -I../../../../include -D__OSVERSION__=11 -
D__hpux__ -D__ia64__ -o static/bootstrapstub.o bootstrapstub.cc
"../omniORB4/bootstrapSK.cc", line 171: error #3345: an empty
initializer is invalid for an array with unspecified bound
const char* const _0RL_cd_96f078e2247ab9da_00000000::_user_exns[] = {
^

"../omniORB4/bootstrapSK.cc", line 230: error #3345: an empty
initializer is invalid for an array with unspecified bound
const char* const _0RL_cd_96f078e2247ab9da_20000000::_user_exns[] = {

--------

It is caused by a declaration of zero-length arrays in bootstrapSK.cc.
Gcc allows zero-length arrays , but HP aCC does't allow.
How can I get rid of these errors?

My environments are as below.
UP-UX B.11.31
aCC complier 64bits
HP C/aC++ for Integrity Servers B3910B A.06.15

Thanx in advance.
Duncan Grisby
2009-01-07 18:33:03 UTC
Permalink
On Monday 5 January, Masaaki Sekiya wrote:

[...]
Post by Masaaki Sekiya
"../omniORB4/bootstrapSK.cc", line 230: error #3345: an empty
initializer is invalid for an array with unspecified bound
const char* const _0RL_cd_96f078e2247ab9da_20000000::_user_exns[] = {
It is caused by a declaration of zero-length arrays in bootstrapSK.cc.
Gcc allows zero-length arrays , but HP aCC does't allow.
How can I get rid of these errors?
I've checked in a change to CVS that puts a zero in the array, so the
arrays are never zero length. Does that work for you?

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Masaaki Sekiya
2009-01-08 16:55:24 UTC
Permalink
Hi Duncan.

Zero-length arrays were generated by omniidl.
But now I checked the latest modules in CVS, it was fixed by you.

Thanks.
Post by Duncan Grisby
[...]
Post by Masaaki Sekiya
"../omniORB4/bootstrapSK.cc", line 230: error #3345: an empty
initializer is invalid for an array with unspecified bound
const char* const _0RL_cd_96f078e2247ab9da_20000000::_user_exns[] = {
It is caused by a declaration of zero-length arrays in bootstrapSK.cc.
Gcc allows zero-length arrays , but HP aCC does't allow.
How can I get rid of these errors?
I've checked in a change to CVS that puts a zero in the array, so the
arrays are never zero length. Does that work for you?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
Loading...