s3: Use poll in smbd
[samba.git] / source3 / smbd / globals.h
index c326846825266a53933dae051d88289d2d593b2a..b10268e6d7b1dbad41807e6e5cf522557ca1fb78 100644 (file)
@@ -18,6 +18,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "system/select.h"
+
 #if defined(WITH_AIO)
 struct aio_extra;
 extern struct aio_extra *aio_list_head;
@@ -456,6 +458,12 @@ struct smbd_server_connection {
        bool using_smb2;
        int trans_num;
 
+       /*
+        * Cache for calling poll(2) to avoid allocations in our
+        * central event loop
+        */
+       struct pollfd *pfds;
+
        struct files_struct *files;
        struct bitmap *file_bmap;
        int real_max_open_files;