[zeromq-dev] PGM 2.0.21rc6 updates require code changes
Steven McCoy
steven.mccoy at miru.hk
Sat Jan 23 07:19:00 CET 2010
Hi Hi,
This release candidate fixes all the strict-aliasing warnings under GCC
4.4, fixes alignment and stack issues calling WSARecvMsg on Win32, UUID
interface naming under Windows, and introduces Win64 and HPET timer support
on Linux. Additional error handling has been added to pgm_init to diagnose
startup issues.
All platforms:
Strict aliasing and type punning refers to casting different structures onto
the same area of memory. Current compilers raise errors in casting struct
sockaddr_storage* and struct sockaddr_in* and friends. The workarounds
include using unions on the different types or copying the underlying data.
In order to cleanly handle issues initializing Winsock on Windows or timer
specific devices on Linux additional error handling has been added to the
PGM engine startup call pgm_init. This breaks ABI compatibility and
programs should add either a NULL parameter or full error handling such as
follows,
GError* err = NULL;
if (!pgm_init (&err)) {
g_error ("Unable to start PGM engine: %s", err->message);
g_error_free (err);
return EXIT_FAILURE;
}
Linux:
HPET timing is the preferred solution for high resolution timing overcoming
problems of TSC inconsistency between cores. It is enabled by setting
PGM_TIMER to "HPET". Not all systems have a HPET so check with "dmesg |
grep -i hpet" first. Also note many distributions do not set open
permissions of the "/dev/hpet" device and you may wish to enable group read
access.
Windows:
WSARecvMsg support was broken in 2.0.20rc5 due to incorrect alignment
handling - incompatibilities between Unix and Windows CMSG handling, and
stack issues with the function signature. The workaround in 2.0.20rc5 is to
use the Wine libraries which use recvfrom instead. Problems are evident in
random crashing within recvskb to pgm_rxw_update.
Win64 means x86-64 and not IA64, and should be functional in XP64 through 7.
Windows interfaces usually have UUID names which are 38-characters long
exceeding the Unix typical definition of 16 characters specified by
IF_NAMESIZE or IFNAMSIZ.
--
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100123/df6b7216/attachment.htm>
More information about the zeromq-dev
mailing list