1 // Copyright 2017 The Fuchsia Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include <trace-engine/instrumentation.h> 6 7 8 #include <atomic> 9 10 namespace { 11 12 std::atomic_uint64_t g_nonce{1u}; 13 14 } // namespace 15 trace_generate_nonce()16__EXPORT uint64_t trace_generate_nonce() { 17 return g_nonce.fetch_add(1u, std::memory_order_relaxed); 18 } 19