mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 04:59:59 +08:00
tcpdump: Make loop monitor cooperative
This helps a bit if the fgetc() is non-blocking. Update #4650.
This commit is contained in:
@@ -143,6 +143,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)
|
||||
@@ -1247,6 +1248,8 @@ pcap_loop_monitor(rtems_task_argument arg)
|
||||
pcap_breakloop(pd);
|
||||
break;
|
||||
}
|
||||
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
rtems_task_delete(RTEMS_SELF);
|
||||
|
Reference in New Issue
Block a user