Skip to content

Commit

Permalink
Simply adds a header and source
Browse files Browse the repository at this point in the history
  • Loading branch information
Officeyutong committed Oct 9, 2023
1 parent f235f9d commit aef16ee
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ set(sources
src/bpf_map/array_map.cpp
src/bpf_map/hash_map.cpp
src/bpf_map/ringbuf_map.cpp
src/bpf_map/perf_event_array.cpp
)

# list(APPEND sources
Expand Down
Empty file.
24 changes: 24 additions & 0 deletions runtime/src/bpf_map/perf_event_array.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef _PERF_EVENT_ARRAY_HPP
#define _PERF_EVENT_ARRAY_HPP
#include <cstdint>
#include <boost/interprocess/managed_shared_memory.hpp>
namespace bpftime
{
class perf_event_array_impl {
private:

public:
const static bool should_lock = true;
perf_event_array_impl(boost::interprocess::managed_shared_memory &memory,
uint32_t key_size, uint32_t value_size);

void *elem_lookup(const void *key);

long elem_update(const void *key, const void *value, uint64_t flags);

long elem_delete(const void *key);

int bpf_map_get_next_key(const void *key, void *next_key);
};
} // namespace bpftime
#endif

0 comments on commit aef16ee

Please sign in to comment.