On Jun 20, 2013, at 4:40 PM, Doug Ledford <dledf...@redhat.com> wrote:

>> {
>>      static char str[16];
>>      snprintf(str, sizeof(str), "%d", ibv_mtu_to_num(max_mtu));
>>        return str;
>> }
> 
> That is not, however, multi-thread safe nor advisable unless you clearly
> indicate in the man page to the function that subsequent calls to the
> function wipe out the result of previous calls.  It's not even single
> thread safe if you have more than one interface and don't know that
> later calls wipe this buffer out.  Best to avoid library routines such
> as this.

This is in the devinfo.c program (which is single-threaded), not in the library 
itself.

But regardless, this whole function went away in V2 of the patch.

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to