Hash :
44a5c913
Author :
Date :
2021-06-17T09:29:29
CL: Make CL front end and back end thread-safe Add locking to all mutable variables of the CL objects in the front end and pass-through back end to make them thread-safe. This fixes a crash in a multi-threaded CTS test. Bug: angleproject:6015 Change-Id: I1d6471c851217639411c434c82acd32d14035291 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967468 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLObject.cpp: Implements the cl::Object class.
#include "libANGLE/CLObject.h"
namespace cl
{
Object::Object() : mRefCount(1u) {}
Object::~Object()
{
if (mRefCount != 0u)
{
WARN() << "Deleted object with references";
}
}
} // namespace cl