[fs] Remove unused Mxio dispatcher
Change-Id: I691502ad0bb1bfe16a907e81d73ba4b608da6730
Esse commit está contido em:
commit de
CQ bot account: commit-bot@chromium.org
pai
953029eb9b
commit
6d5d7f7c96
@@ -13,15 +13,15 @@ static_library("fs") {
|
||||
"include/fs/block-txn.h",
|
||||
"include/fs/dispatcher.h",
|
||||
"include/fs/mapped-vmo.h",
|
||||
"include/fs/mxio-dispatcher.h",
|
||||
"include/fs/trace.h",
|
||||
"include/fs/vfs-client.h",
|
||||
"include/fs/vfs-dispatcher.h",
|
||||
"include/fs/vfs.h",
|
||||
"async-dispatcher.cpp",
|
||||
"mapped-vmo.cpp",
|
||||
"mxio-dispatcher.cpp",
|
||||
"vfs-dispatcher.cpp",
|
||||
"mapped-vmo.cpp",
|
||||
"vfs.cpp",
|
||||
"vfs-mount.cpp",
|
||||
"vfs-rpc.cpp",
|
||||
"vfs-unmount.cpp",
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright 2017 The Fuchsia Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <magenta/types.h>
|
||||
#include <fbl/unique_ptr.h>
|
||||
#include <mxio/dispatcher.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
#include "dispatcher.h"
|
||||
|
||||
namespace fs {
|
||||
|
||||
// MxioDispatcher wraps the C-based single-threaded mxio dispatcher.
|
||||
class MxioDispatcher final : public fs::Dispatcher {
|
||||
public:
|
||||
// Creates the dispatcher.
|
||||
// This should eventually be followed by a call to Start() or Run() depending
|
||||
// on which thread the dispatcher should run on.
|
||||
static mx_status_t Create(fbl::unique_ptr<fs::MxioDispatcher>* out);
|
||||
|
||||
// Starts the dispatcher on a new thread.
|
||||
mx_status_t StartThread();
|
||||
|
||||
// Runs the dispatcher on the current thread.
|
||||
void RunOnCurrentThread();
|
||||
|
||||
mx_status_t AddVFSHandler(mx::channel channel, vfs_dispatcher_cb_t cb, void* iostate) override;
|
||||
|
||||
private:
|
||||
MxioDispatcher();
|
||||
|
||||
mxio_dispatcher_t* dispatcher_;
|
||||
|
||||
DISALLOW_COPY_ASSIGN_AND_MOVE(MxioDispatcher);
|
||||
};
|
||||
|
||||
} // namespace fs
|
||||
@@ -1,45 +0,0 @@
|
||||
// Copyright 2017 The Fuchsia Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <magenta/types.h>
|
||||
#include <fbl/alloc_checker.h>
|
||||
#include <fbl/unique_ptr.h>
|
||||
#include <mxio/dispatcher.h>
|
||||
#include <fs/mxio-dispatcher.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
namespace fs {
|
||||
|
||||
mx_status_t MxioDispatcher::Create(fbl::unique_ptr<fs::MxioDispatcher>* out) {
|
||||
fbl::AllocChecker ac;
|
||||
fbl::unique_ptr<MxioDispatcher> d(new (&ac) MxioDispatcher());
|
||||
if (!ac.check()) {
|
||||
return MX_ERR_NO_MEMORY;
|
||||
}
|
||||
mx_status_t status = mxio_dispatcher_create(&d->dispatcher_, mxrio_handler);
|
||||
if (status != MX_OK) {
|
||||
return status;
|
||||
}
|
||||
*out = fbl::move(d);
|
||||
return MX_OK;
|
||||
}
|
||||
|
||||
mx_status_t MxioDispatcher::StartThread() {
|
||||
return mxio_dispatcher_start(dispatcher_, "libfs-mxio-dispatcher");
|
||||
}
|
||||
|
||||
void MxioDispatcher::RunOnCurrentThread() {
|
||||
mxio_dispatcher_run(dispatcher_);
|
||||
}
|
||||
|
||||
mx_status_t MxioDispatcher::AddVFSHandler(mx::channel channel, vfs_dispatcher_cb_t cb, void* iostate) {
|
||||
return mxio_dispatcher_add(dispatcher_, channel.release(), (void*) cb, iostate);
|
||||
}
|
||||
|
||||
MxioDispatcher::MxioDispatcher() {}
|
||||
|
||||
} // namespace fs
|
||||
@@ -11,7 +11,6 @@ MODULE_TYPE := userlib
|
||||
MODULE_SRCS += \
|
||||
$(LOCAL_DIR)/async-dispatcher.cpp \
|
||||
$(LOCAL_DIR)/mapped-vmo.cpp \
|
||||
$(LOCAL_DIR)/mxio-dispatcher.cpp \
|
||||
$(LOCAL_DIR)/vfs.cpp \
|
||||
$(LOCAL_DIR)/vfs-mount.cpp \
|
||||
$(LOCAL_DIR)/vfs-unmount.cpp \
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário