Commit 10466626 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1301 from rodgert/master

Make alignment compiler directive
parents b6b990f5 413f835b
...@@ -33,7 +33,11 @@ namespace zmq ...@@ -33,7 +33,11 @@ namespace zmq
// This structure defines the commands that can be sent between threads. // This structure defines the commands that can be sent between threads.
#ifdef _MSC_VER
__declspec(align(64)) struct command_t
#else
struct command_t struct command_t
#endif
{ {
// Object to process the command. // Object to process the command.
zmq::object_t *destination; zmq::object_t *destination;
...@@ -147,12 +151,11 @@ namespace zmq ...@@ -147,12 +151,11 @@ namespace zmq
} done; } done;
} args; } args;
#ifdef _MSC_VER
enum { pad_size = 64 - (sizeof(zmq::object_t*) + sizeof(args_t) + sizeof(type_t)) };
unsigned char unused[ pad_size ];
}; };
#else
} __attribute__((aligned(64)));
#endif
} }
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment