summaryrefslogtreecommitdiff
path: root/lib/thread.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-03-03 18:53:28 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-03-04 12:33:56 -0500
commit209a72a66affadeee952b423da85ab9f4771806c (patch)
tree2acaff2b212b746f1395319d16c7a06a23376968 /lib/thread.h
parent4a2587c6dc37dc1fc0e32dff688204a47848197e (diff)
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>
Diffstat (limited to 'lib/thread.h')
-rw-r--r--lib/thread.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/thread.h b/lib/thread.h
index c0ecb99ed5..29de0f117e 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -46,6 +46,12 @@ struct thread_list
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
{
@@ -57,9 +63,9 @@ struct thread_master
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;
};