Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Unified Diff: ui/ozone/platform/drm/gpu/gpu_lock.cc

Issue 1141243002: [Ozone-Drm] Remove GPU lock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/gpu_lock.h ('k') | ui/ozone/platform/drm/ozone_platform_drm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/gpu_lock.cc
diff --git a/ui/ozone/platform/drm/gpu/gpu_lock.cc b/ui/ozone/platform/drm/gpu/gpu_lock.cc
deleted file mode 100644
index bcb287dc9bc28b6e9939530d479f06f9af0e9a3c..0000000000000000000000000000000000000000
--- a/ui/ozone/platform/drm/gpu/gpu_lock.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 The Chromium 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 "ui/ozone/platform/drm/gpu/gpu_lock.h"
-
-#include <sys/file.h>
-#include <unistd.h>
-
-#include "base/logging.h"
-#include "base/posix/eintr_wrapper.h"
-
-namespace ui {
-
-namespace {
-const char kGpuLockFile[] = "/run/frecon";
-}
-
-GpuLock::GpuLock() {
- fd_ = open(kGpuLockFile, O_RDWR);
- if (fd_ < 0) {
- PLOG(ERROR) << "Failed to open lock file '" << kGpuLockFile << "'";
- return;
- }
-
- VLOG(1) << "Taking write lock on '" << kGpuLockFile << "'";
- if (HANDLE_EINTR(flock(fd_, LOCK_EX)))
- PLOG(ERROR) << "Error while trying to get lock on '" << kGpuLockFile << "'";
-
- VLOG(1) << "Done trying to take write lock on '" << kGpuLockFile << "'";
-}
-
-GpuLock::~GpuLock() {
- // Failed to open the lock file, so nothing to do here.
- if (fd_ < 0)
- return;
-
- VLOG(1) << "Releasing write lock on '" << kGpuLockFile << "'";
- close(fd_);
-}
-
-} // namespace ui
« no previous file with comments | « ui/ozone/platform/drm/gpu/gpu_lock.h ('k') | ui/ozone/platform/drm/ozone_platform_drm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698