RTEMS5/libbsd support

This commit is contained in:
Michael Davidsaver
2021-06-15 21:15:18 -07:00
parent b1c60ff651
commit f8cdcd4f91
9 changed files with 145 additions and 2 deletions
+10 -1
View File
@@ -165,7 +165,16 @@ struct evbase::Pvt : public epicsThreadRunable
{
INST_COUNTER(evbaseRunning);
try {
decltype (base) tbase(event_base_new());
evconfig conf(event_config_new());
#ifdef __rtems__
/* with libbsd circa RTEMS 5.1
* TCP peer close/reset notifications appear to be lost.
* Maybe due to absence of NOTE_EOF?
* poll() seems to work though.
*/
event_config_avoid_method(conf.get(), "kqueue");
#endif
decltype (base) tbase(event_base_new_with_config(conf.get()));
if(evthread_make_base_notifiable(tbase.get())) {
throw std::runtime_error("evthread_make_base_notifiable");
}