blob: 763a436d1de75ff9b2a29bcb7c76438b4a94ebcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright 2022 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.
#ifndef IPCZ_SRC_IPCZ_BUFFER_ID_H_
#define IPCZ_SRC_IPCZ_BUFFER_ID_H_
#include <cstdint>
#include "util/strong_alias.h"
namespace ipcz {
// Identifies a shared memory buffer scoped to a NodeLink and owned by its
// NodeLinkMemory via a BufferPool. New BufferIds are allocated atomically by
// either side of the NodeLink.
using BufferId = StrongAlias<class BufferIdTag, uint64_t>;
constexpr BufferId kInvalidBufferId{~0};
} // namespace ipcz
#endif // IPCZ_SRC_IPCZ_BUFFER_ID_H_
|