[Openslp-devel] slptool hangs on AIX?
Brought to you by:
jcalcote
|
From: Jim M. <jim...@wb...> - 2012-10-30 17:31:32
|
Hi,
Been testing the AIX build I have and the agent is working fine but
when I invoke slptool it basically hangs. Stepping into the code we get
to libslp_handle.c line 66
if (SLPAtomicInc(&s_OpenSLPHandleCount) == 1)
The SLPAtomicInc function does this on AIX:
return (intptr_t)fetch_and_add((atomic_p)pn, 1);
This is the cause of the hang, because fetch_and_add "[...] returns the
original value of the variable" (from the man page), in this case '0'.
When this happens the code enters a while loop
while (!s_HandlesInitialized)
sleep(0);
The only way I can work around this is to remove the "#define
USE_AIX_ATOMICS" (line 137 of slp_atomics.c).
This code has been in OpenSLP for a long time (Aug 2006), so I am
wondering if this is working for others? And if so, how?
Thank you
--
mail
Jim Marshall
Sr. Software Engineer
WS <http://ws-inc.com/>
|