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#include <fbl/atomic.h> 8 9namespace { 10 11fbl::atomic_uint64_t g_nonce{1u}; 12 13} // namespace 14 15uint64_t trace_generate_nonce() { 16 return g_nonce.fetch_add(1u, fbl::memory_order_relaxed); 17} 18