diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-11 08:12:21 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-12 07:51:46 +0200 |
commit | a5bdd7ae40a3031a86fd5d061c4c1a9920e40686 (patch) | |
tree | d4c6c68da3410054f0e4cc7065ba18f696b09fb2 | |
parent | Add program destructor support (diff) | |
download | rtems-libbsd-a5bdd7ae40a3031a86fd5d061c4c1a9920e40686.tar.bz2 |
tcpdump: Make loop monitor cooperative
This helps a bit if the fgetc() is non-blocking.
Update #4649.
-rw-r--r-- | freebsd/contrib/tcpdump/tcpdump.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/freebsd/contrib/tcpdump/tcpdump.c b/freebsd/contrib/tcpdump/tcpdump.c index b1e7f0d1..74c878a3 100644 --- a/freebsd/contrib/tcpdump/tcpdump.c +++ b/freebsd/contrib/tcpdump/tcpdump.c @@ -139,6 +139,7 @@ The Regents of the University of California. All rights reserved.\n"; #include <sys/sysctl.h> #include <machine/rtems-bsd-commands.h> #include <assert.h> +#include <sched.h> #include <rtems.h> #include <rtems/linkersets.h> #define setpriority(a, b, c) @@ -1224,6 +1225,8 @@ pcap_loop_monitor(rtems_task_argument arg) pcap_breakloop(pd); break; } + + sched_yield(); } rtems_task_delete(RTEMS_SELF); |