aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/library/pdisk_io/spdk_state.h
blob: 2c60964f44e78f5676aae64c257de1054697848e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once 
 
#include <util/system/yassert.h> 
 
namespace NKikimr::NPDisk { 
 
class ISpdkState { 
public: 
    virtual void LaunchThread(int (*fn)(void *), void *cookie) = 0; 
    virtual ui8 *Malloc(ui64 size, ui32 align) = 0; 
    virtual void Free(ui8 *buff) = 0; 
    //virtual ui64 GetDeviceSize() = 0; 
    virtual void WaitAllThreads() = 0; 
    virtual ~ISpdkState() {}; 
}; 
 
class TSpdkStateOSS : public ISpdkState { 
public: 
    TSpdkStateOSS() {} 
 
    void LaunchThread(int (*)(void *), void *) override { 
         Y_FAIL("Spdk is not supported now"); 
    } 
 
    ui8 *Malloc(ui64, ui32) override { 
         Y_FAIL("Spdk is not supported now"); 
    } 
 
    void Free(ui8 *) override { 
         Y_FAIL("Spdk is not supported now"); 
    } 
 
    //ui64 GetDeviceSize() override { 
    //     Y_FAIL("Spdk is not supported now"); 
    //} 
 
    void WaitAllThreads() override { 
         Y_FAIL("Spdk is not supported now"); 
    } 
}; 
 
}