Not too long ago, someone asked about compiling 0MQ on Windows X64. With the 
help of my colleague, Brett Cameron, I have a working version compiled using 
VS2010 and running on Windows 7 X64.
Only one minor change was required in atomic_ptr.hpp:

#if defined ZMQ_ATOMIC_PTR_WINDOWS
//            return (T*) InterlockedExchangePointer (&ptr, val_);
            return (T*) InterlockedExchangePointer ((PVOID *) &ptr, val_);

The change is a quick solution and is not, in my mind, what really should be 
done. There are a  number of preprocessor statements which equate X86 with X64, 
thus leading to the use of 32-bit pointers and data types. These should be 
changed to differentiate between the two machine types.


Does it work? Yes. Is it faster? Do not know yet, hope to do some testing in 
the near future as time permits.
----------------------------------------------------
Dumps of the respective programs, LOCAL_LAT in this case, show the X86 and X64 
images. See below.

Dump of file \\bigwinnie\bigwinniec$\amqp\zeromq-2.0.6\bin\local_lat.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
             14C machine (x86)
               7 number of sections
        4BAB295D time date stamp Thu Mar 25 10:14:05 2010
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
             102 characteristics
                   Executable
                   32 bit word machine
----------------------------------------------------
Dump of file C:\amqp\zeromq-2.0.6\bin\local_lat.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
            8664 machine (x64)
               7 number of sections
        4BC5D8E8 time date stamp Wed Apr 14 17:02:00 2010
               0 file pointer to symbol table
               0 number of symbols
              F0 size of optional header
              22 characteristics
                   Executable
                   Application can handle large (>2GB) addresses
----------------------------------------------------
-- [email protected] | +491718691813 | http://twitter.com/johnapps --

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to