npkit_struct.h 601 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*************************************************************************
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 ************************************************************************/

#ifndef NPKIT_STRUCT_H_
#define NPKIT_STRUCT_H_

#include <cstdint>

#pragma pack(push, 1)

union NpKitEvent {
  uint64_t bits[2];
  struct {
    uint64_t type : 8;
    uint32_t size : 32;
    uint64_t rsvd : 24;
    uint64_t timestamp;
  } fields;
};

struct NpKitEventCollectContext {
  NpKitEvent* event_buffer;
  uint64_t event_buffer_head;
};

#pragma pack(pop)

#endif