clebertsuconic commented on a change in pull request #2523: ARTEMIS-1977 
ASYNCIO can reduce sys-calls to retrieve I/O events
URL: https://github.com/apache/activemq-artemis/pull/2523#discussion_r251130524
 
 

 ##########
 File path: 
artemis-native/src/main/c/org_apache_activemq_artemis_jlibaio_LibaioContext.c
 ##########
 @@ -57,6 +57,92 @@ struct io_control {
 
 };
 
+//These should be used to check if the user_io_getevents is supported, but 
almost every modern kernel support it
+#define AIO_RING_MAGIC 0xa10a10a1
+#define AIO_RING_INCOMPAT_FEATURES     0
+//memory order relaxed/acquire/release/seq_cst x86_64 fences implementations
+#define mem_barrier() __asm__ __volatile__ ("":::"memory")
+#define read_barrier() __asm__ __volatile__("lfence":::"memory")
+#define store_barrier()        __asm__ __volatile__("sfence":::"memory")
+#define full_barrier() __asm__ __volatile__("mfence":::"memory")
+
 
 Review comment:
   Is there any documentation about this?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to