Skip to content

Commit f8971a1

Browse files
committed
file cache: import event ports implementation
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
1 parent 8180362 commit f8971a1

File tree

4 files changed

+468
-2
lines changed

4 files changed

+468
-2
lines changed

CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ else()
6363
set(UMEM_EXTRA_SOURCE slab_umem.c)
6464
endif()
6565

66+
# select which event monitoring API to use
67+
if(JEFFPC_HAVE_PORT_H)
68+
set(FILE_CACHE_EXTRA_SOURCE file_cache_event_port.c)
69+
else()
70+
set(FILE_CACHE_EXTRA_SOURCE)
71+
endif()
72+
6673
find_package(BISON)
6774
find_package(FLEX)
6875

@@ -93,6 +100,7 @@ add_library(jeffpc SHARED
93100
cstr.c
94101
error.c
95102
file_cache.c
103+
${FILE_CACHE_EXTRA_SOURCE}
96104
fmt_cbor.c
97105
hexdump.c
98106
init.c

cmake/config.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016-2018 Josef 'Jeff' Sipek <[email protected]>
2+
# Copyright (c) 2016-2019 Josef 'Jeff' Sipek <[email protected]>
33
#
44
# Permission is hereby granted, free of charge, to any person obtaining a copy
55
# of this software and associated documentation files (the "Software"), to deal
@@ -70,6 +70,7 @@ check_function_exists(pthread_cond_reltimedwait_np
7070
check_function_exists(reallocarray JEFFPC_HAVE_REALLOCARRAY)
7171
check_function_exists(recallocarray JEFFPC_HAVE_RECALLOCARRAY)
7272
check_include_files(alloca.h JEFFPC_HAVE_ALLOCA_H)
73+
check_include_files(port.h JEFFPC_HAVE_PORT_H)
7374
check_include_files(sys/debug.h JEFFPC_HAVE_SYS_DEBUG_H)
7475
check_symbol_exists(EAI_ADDRFAMILY "netdb.h" JEFFPC_HAVE_EAI_ADDRFAMILY)
7576
check_symbol_exists(EAI_NODATA "netdb.h" JEFFPC_HAVE_EAI_NODATA)

0 commit comments

Comments
 (0)