Put common ioqueue functionalities in separate file to be used by both select() and epoll

git-svn-id: https://svn.pjsip.org/repos/pjproject/main@12 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib/include/pj/ioqueue.h b/pjlib/include/pj/ioqueue.h
index 6a7b827..2e084fd 100644
--- a/pjlib/include/pj/ioqueue.h
+++ b/pjlib/include/pj/ioqueue.h
@@ -82,11 +82,10 @@
  *

  * The items below describe rules that must be obeyed when using the I/O 

  * queue, with regard to concurrency:

- *  - in general, the I/O queue is thread safe (assuming the lock strategy

- *    is not changed to disable mutex protection). All operations, except

- *    unregistration which is described below, can be safely invoked 

- *    simultaneously by multiple  threads.

- *  - however, <b>care must be taken when unregistering a key</b> from the

+ *  - simultaneous operations (by different threads) to different key is safe.

+ *  - simultaneous operations to the same key is also safe, except

+ *    <b>unregistration</b>, which is described below.

+ *  - <b>care must be taken when unregistering a key</b> from the

  *    ioqueue. Application must take care that when one thread is issuing

  *    an unregistration, other thread is not simultaneously invoking an

  *    operation <b>to the same key</b>.

@@ -205,11 +204,16 @@
 } pj_ioqueue_operation_e;
 
 
-/**
- * Indicates that the I/O Queue should be created to handle reasonable
- * number of threads.
- */
-#define PJ_IOQUEUE_DEFAULT_THREADS  0
+/**

+ * This macro specifies the maximum number of events that can be

+ * processed by the ioqueue on a single poll cycle, on implementation

+ * that supports it. The value is only meaningfull when specified

+ * during PJLIB build.

+ */

+#ifndef PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL

+#   define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL     (16)

+#endif

+
 

 /**
  * Create a new I/O Queue framework.