mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Require new libuEV API: uev_init1() to enforce a small event cache
In cases where you have multiple events pending in the cache and some event may cause later ones, already sent by the kernel to userspace, to be deleted the pointer returned to the event loop for this later event may be deleted. There are two ways around this (accessing deleted memory); 1) use this function to initialize your event loop and set maxevents to 1, 2) use a free list in you application that you garbage collect at intervals relevant to your application. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT32_T
|
||||
|
||||
# Check for required libraries
|
||||
PKG_CHECK_MODULES([uev], [libuev >= 2.1.0])
|
||||
PKG_CHECK_MODULES([uev], [libuev >= 2.2.0])
|
||||
PKG_CHECK_MODULES([lite], [libite >= 2.0.1])
|
||||
|
||||
# Check for configured Finit features
|
||||
|
||||
+1
-1
@@ -279,7 +279,7 @@ int main(int argc, char* argv[])
|
||||
/*
|
||||
* Initalize event context.
|
||||
*/
|
||||
uev_init(&loop);
|
||||
uev_init1(&loop, 1);
|
||||
ctx = &loop;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user