WIP measure latency + remove wrong comment
This commit is contained in:
parent
8165b4a907
commit
afbb41fa2e
3 changed files with 19 additions and 2 deletions
|
@ -26,13 +26,17 @@ list(APPEND CSOURCES
|
|||
)
|
||||
|
||||
add_executable(donar ${CSOURCES} src/donar.c)
|
||||
add_executable(measlat ${CSOURCES} src/meas_lat.c)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
|
||||
target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(donar ${GLIB_LDFLAGS})
|
||||
|
||||
target_include_directories(measlat PRIVATE ${GLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(measlat ${GLIB_LDFLAGS})
|
||||
|
||||
install(TARGETS donar
|
||||
install(TARGETS donar measlat
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib)
|
|
@ -80,7 +80,7 @@ void evt_core_add_fd(struct evt_core_ctx* ctx, char* name, int fd) {
|
|||
}
|
||||
|
||||
g_array_append_val (cat->socklist, fd);
|
||||
g_hash_table_insert(ctx->socklist, key, cat); // broken
|
||||
g_hash_table_insert(ctx->socklist, key, cat);
|
||||
add_fd_to_epoll(ctx->epollfd, fd, cat->flags);
|
||||
}
|
||||
|
||||
|
|
13
src/meas_lat.c
Normal file
13
src/meas_lat.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "evt_core.h"
|
||||
|
||||
int main(void) {
|
||||
struct evt_core_ctx evts = {0};
|
||||
struct evt_core_cat udp_read = {};
|
||||
struct evt_core_cat timer = {};
|
||||
|
||||
evt_core_init(&evts);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue