Skip to content

Commit

Permalink
Use kqueue as the backend of AE on DragonFlyBSD (valkey-io#450)
Browse files Browse the repository at this point in the history
Currently, we use select(2) on DragonFlyBSD while
`kqueue` is available on DragonFlyBSD since FreeBSD 4.1
and DragonFlyBSD was originally forked from FreeBSD 4.8

`select(2)` is a pretty old technique that has many defects
compared to `kqueue`, we should switch to `kqueue` on DragonFlyBSD.

Signed-off-by: Andy Pan <i@andypan.me>
Signed-off-by: adetunjii <adetunjithomas1@outlook.com>
  • Loading branch information
panjf2000 authored and adetunjii committed May 15, 2024
1 parent e83f9af commit 217e3d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@
#define HAVE_PIPE2 1
#endif

#if (defined(__APPLE__) && defined(MAC_OS_10_6_DETECTED)) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined (__NetBSD__)
/* Detect for kqueue */
#if (defined(__APPLE__) && defined(MAC_OS_10_6_DETECTED)) || \
defined(__DragonFly__) || \
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined (__NetBSD__)
#define HAVE_KQUEUE 1
#endif

Expand Down

0 comments on commit 217e3d0

Please sign in to comment.