lib: Abstract fd set operations
Abstract FD set operations so that we can eventually
choose what type of select/poll operation that
we want to use.
Signed-off-by: Donald Sharp <sharpd@cumulusnetowkrs.com>
diff --git a/lib/thread.h b/lib/thread.h
index 5a3bf7d..dafd438 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -45,6 +45,12 @@
struct pqueue;
+/*
+ * Abstract it so we can use different methodologies to
+ * select on data.
+ */
+typedef fd_set thread_fd_set;
+
/* Master of the theads. */
struct thread_master
{
@@ -56,9 +62,9 @@
struct thread_list unuse;
struct pqueue *background;
int fd_limit;
- fd_set readfd;
- fd_set writefd;
- fd_set exceptfd;
+ thread_fd_set readfd;
+ thread_fd_set writefd;
+ thread_fd_set exceptfd;
unsigned long alloc;
};