summaryrefslogtreecommitdiff
path: root/src/mongo/db/concurrency/SConscript
blob: 752fe830f1fbcf13461ace0b8ea02ec3d81362cb (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# -*- mode: python -*-

Import("env")

env = env.Clone()

env.Library(
    target='deferred_writer',
    source=[
        'deferred_writer.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/catalog/collection',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/catalog/catalog_helpers',
        '$BUILD_DIR/mongo/db/db_raii',
        '$BUILD_DIR/mongo/util/concurrency/thread_pool',
    ],
)

env.Library(
    target='write_conflict_exception',
    source=[
        'write_conflict_exception.cpp',
        env.Idlc('write_conflict_exception.idl')[0],
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/idl/server_parameter',
        '$BUILD_DIR/mongo/util/fail_point',
        '$BUILD_DIR/mongo/util/log_and_backoff',
    ],
)

env.Library(
    target='lock_manager',
    source=[
        'd_concurrency.cpp',
        'lock_manager.cpp',
        'lock_state.cpp',
        'lock_stats.cpp',
        'replication_state_transition_lock_guard.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/util/background_job',
        '$BUILD_DIR/mongo/util/concurrency/spin_lock',
        '$BUILD_DIR/mongo/util/concurrency/ticketholder',
        '$BUILD_DIR/third_party/shim_boost',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/catalog/collection_catalog',
        '$BUILD_DIR/mongo/db/concurrency/flow_control_ticketholder',
    ],
)

env.Library(
    target='flow_control_ticketholder',
    source=[
        'flow_control_ticketholder.cpp',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/base',
    ],
)

env.Benchmark(
    target='lock_manager_bm',
    source=[
        'd_concurrency_bm.cpp',
    ],
    LIBDEPS=[
        'lock_manager',
    ])

env.CppUnitTest(
    target='db_concurrency_test',
    source=[
        'd_concurrency_test.cpp',
        'fast_map_noalloc_test.cpp',
        'lock_manager_test.cpp',
        'lock_state_test.cpp',
        'lock_stats_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/auth/authmocks',
        '$BUILD_DIR/mongo/db/curop',
        '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
        '$BUILD_DIR/mongo/util/progress_meter',
        'lock_manager',
        'write_conflict_exception',
    ]
)