Use O_DIRECT, but only if available.

TODO: The kernel version should be looked up at startup and made
      generally available so that it is readily available for
      anybody interested.
This commit is contained in:
Johan Wikman
2017-05-03 13:28:28 +03:00
parent 00b6c10089
commit ab31cd4b1a
3 changed files with 119 additions and 6 deletions

View File

@ -116,6 +116,21 @@ public:
typedef MessageQueueHandler Handler;
typedef MessageQueueMessage Message;
/**
* Initializes the message queue mechanism. To be called once at
* process startup.
*
* @return True if the initialization succeeded, false otherwise.
*/
static bool init();
/**
* Finalizes the message queue mechanism. To be called once at
* process shutdown, if the initialization succeeded.
*/
static void finish();
/**
* Creates a @c MessageQueue with the provided handler.
*