[ofw] rsocket.c & gtod.c duplicate include error.

Smith, Stan stan.smith at intel.com
Wed Feb 6 09:05:51 PST 2013


From: Schmitt, Hubert [mailto:Hubert.Schmitt at oce.com]
Sent: Wednesday, February 06, 2013 12:21 AM
To: Smith, Stan
Cc: ofw at lists.openfabrics.org
Subject: AW: rsocket.c & gtod.c duplicate include error.

Hi Stan,

Can it be that you were still using the "original" gtod.c? Because in my recent rsocket patch there was also contained an updated gtod.c with (among other things) gettimeofday() changed to static.
However, non-static gettimeofday() is just as well for me. But I recommend to at least adopt my real modification of gtod.c, in order to fix a potential division-by-zero issue when calling gettimeofday() from a multi-threaded process (see also ofw Digest, Vol 68, Issue 2 from Dec 17, 2012).

All your divide-by-zero mods are included.

The 'static' qualifier is IMHO is the incorrect attribute to be using; how many copies of gettimeofday() does an application need?
Not to mention the 'static' inhibits the detection of duplicate gtod.c includes.
It's truly sad that gettimeofday() is a '#include <etc/gtod.c>' and not in a library somewhere.
I'm convinced that for now, the 'static' qualifier should be removed and will do so.

Stan.

Thanks,
Hubert
________________________________
Von: Smith, Stan [mailto:stan.smith at intel.com]
Gesendet: Dienstag, 5. Februar 2013 22:43
An: Schmitt, Hubert
Cc: ofw at lists.openfabrics.org<mailto:ofw at lists.openfabrics.org>
Betreff: rsocket.c & gtod.c duplicate include error.
Hello,
  When building winOFED from trunk\ svn.3425 I find duplicate definitions of gettimeofday() link errors when building ulp\librdmacm?
Duplication is resultant from



ulp\librdmacm\src\cma_main.cpp:#include "../../../etc/user/gtod.c"

ulp\librdmacm\src\rsocket.cpp:#include "../../../etc/user/gtod.c"



Fixed by removing gtod.c include from rsocket.cpp



Signed-off by stan smith (stan.smith at intel.com<mailto:stan.smith at intel.com>)





--- C:/Users/scsmith/AppData/Local/Temp/rsocket.cpp-revBASE.svn000.tmp.cpp    Thu Jan 24 15:02:56 2013

+++ C:/Users/scsmith/Documents/openIB-windows/ofw/gen1/trunk/ulp/librdmacm/src/rsocket.cpp      Tue Feb 05 13:28:32 2013

@@ -60,8 +60,6 @@

#include <rdma/rsocket.h>

#include "cma.h"

#include "indexer.h"

-#include "../../../etc/user/gtod.c"

-

#define RS_OLAP_START_SIZE 2048

#define RS_MAX_TRANSFER 65536

#define RS_MAX_BACKLOG  256


This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message. Thank you for your co-operation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130206/75b4fd4b/attachment.html>


More information about the ofw mailing list