On Tue, 23 Dec 2008 15:43:46 -0800
Roland Dreier <rdre...@cisco.com> wrote:

>  > Also that is in the test code (libibnetdisc/test/iblinkinfotest.c).  The 
> real
>  > iblinkinfo has them all declared static.
>  > 
>  > void
>  > print_port(ibnd_node_t *node, ibnd_port_t *port)
>  > {
>  >    static char remote_guid_str[256];
>  >    static char remote_str[256];
> 
> so this function is not thread-safe.... This seems to be setting an
> unnecessary booby-trap; is there a reason not to put these variables on
> the stack?

Just what Sean mentioned.

There are actually 2 print_port functions in the 3 patches which were sent.
One is in a prototype tool called iblinkinfotest which was left in the library
directory and optionally built for testing.  The other is in a single threaded
tool which uses the library maintained in the official src dir of
infiniband_diags.  _Neither_ function _is_ part of the library and both are in
single threaded tools.

Ira

_______________________________________________
general mailing list
general@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to