From 9d217fe18be21bdedf36e14237e717240daed1fb Mon Sep 17 00:00:00 2001 From: Mike Stroyan Date: Thu, 2 Apr 2015 11:59:05 -0600 Subject: layers: Add threading checking layer New layer checks for use of objects from multiple threads. --- layers/threading.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 layers/threading.h (limited to 'layers/threading.h') diff --git a/layers/threading.h b/layers/threading.h new file mode 100644 index 00000000..8426e396 --- /dev/null +++ b/layers/threading.h @@ -0,0 +1,32 @@ +/* + * Vulkan + * + * Copyright (C) 2015 LunarG, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// Draw State ERROR codes +typedef enum _THREADING_CHECKER_ERROR +{ + THREADING_CHECKER_NONE, // Used for INFO & other non-error messages + THREADING_CHECKER_MULTIPLE_THREADS, // Object used simultaneously by multiple threads + THREADING_CHECKER_SINGLE_THREAD_REUSE, // Object used simultaneously by recursion in single thread +} THREADING_CHECKER_ERROR; + -- cgit v1.2.3