sapling/eden/fs/inodes/ServerState.cpp
Adam Simpkins ac35979de3 move the clock to ServerState
Summary:
Make ServerState also store the clock as a member variable.  This moves more
server-wide state into the ServerState class, and allows us to eliminate
another argument to the EdenMount constructor.

Reviewed By: chadaustin

Differential Revision: D7297832

fbshipit-source-id: 2a063d67752f46686987390b3faefb304455568a
2018-03-16 12:35:19 -07:00

33 lines
948 B
C++

/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#include "eden/fs/inodes/ServerState.h"
#include "eden/fs/fuse/privhelper/PrivHelper.h"
#include "eden/fs/utils/Clock.h"
#include "eden/fs/utils/UnboundedQueueThreadPool.h"
namespace facebook {
namespace eden {
ServerState::ServerState(
UserInfo userInfo,
std::shared_ptr<PrivHelper> privHelper,
std::shared_ptr<UnboundedQueueThreadPool> threadPool,
std::shared_ptr<Clock> clock)
: userInfo_{std::move(userInfo)},
privHelper_{std::move(privHelper)},
threadPool_{std::move(threadPool)},
clock_{std::move(clock)} {}
ServerState::~ServerState() {}
} // namespace eden
} // namespace facebook