2019-03-15 02:37:38 +01:00
|
|
|
/*
|
|
|
|
* IXSelectInterruptFactory.cpp
|
|
|
|
* Author: Benjamin Sergeant
|
|
|
|
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "IXSelectInterruptFactory.h"
|
|
|
|
|
2020-05-30 19:50:49 +02:00
|
|
|
#include "IXUniquePtr.h"
|
2019-03-16 01:46:40 +01:00
|
|
|
#if defined(__linux__) || defined(__APPLE__)
|
2020-01-07 19:40:36 +01:00
|
|
|
#include "IXSelectInterruptPipe.h"
|
2019-03-15 19:41:57 +01:00
|
|
|
#else
|
2020-01-07 19:40:36 +01:00
|
|
|
#include "IXSelectInterrupt.h"
|
2019-03-15 02:37:38 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace ix
|
|
|
|
{
|
2020-03-24 18:00:41 +01:00
|
|
|
SelectInterruptPtr createSelectInterrupt()
|
2019-03-15 02:37:38 +01:00
|
|
|
{
|
2019-03-16 01:46:40 +01:00
|
|
|
#if defined(__linux__) || defined(__APPLE__)
|
2020-05-30 19:50:49 +02:00
|
|
|
return ix::make_unique<SelectInterruptPipe>();
|
2019-03-15 19:41:57 +01:00
|
|
|
#else
|
2020-05-30 19:50:49 +02:00
|
|
|
return ix::make_unique<SelectInterrupt>();
|
2019-03-15 02:37:38 +01:00
|
|
|
#endif
|
|
|
|
}
|
2019-09-23 19:25:23 +02:00
|
|
|
} // namespace ix
|