VirtualBox

Ignore:
Timestamp:
Feb 9, 2009 4:02:02 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42516
Message:

NAT:NSOK_INC/DEC added to count sockets number for allocation enough pollfd buffer
(and latter epoll_event (for Linux only)).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r16448 r16562  
    5757{
    5858        struct in_addr de_addr;
    59         LIST_ENTRY(dns_entry) de_list; 
     59        LIST_ENTRY(dns_entry) de_list;
    6060};
    6161LIST_HEAD(dns_list_head, dns_entry);
     
    143143    struct socket icmp_socket;
    144144    struct icmp_storage icmp_msg_head;
     145# ifndef RT_OS_WINDOWS
     146    /* counter of sockets needed for allocation enough room to
     147     * process sockets with poll/epoll
     148     *
     149     * NSOCK_INC/DEC should be injected before every
     150     * operation on socket queue (tcb, udb)
     151     */
     152    int nsock;
     153#  define NSOCK_INC() do {pData->nsock++;} while (0)
     154#  define NSOCK_DEC() do {pData->nsock--;} while (0)
     155# else
     156#  define NSOCK_INC() do {} while (0)
     157#  define NSOCK_DEC() do {} while (0)
     158# endif
    145159# ifdef RT_OS_WINDOWS
    146160    void *pvIcmpBuffer;
     
    345359    loop_end_ ## label ## _mt_nounlock:                                 \
    346360    (so) = (sonext)
    347    
     361
    348362#define DO_TCP_OUTPUT(data, sotcb)                                      \
    349363do {                                                                    \
     
    527541        }                                                               \
    528542    }                                                                   \
    529 }while (0) 
    530    
     543}while (0)
     544
    531545#else
    532546#define QSOCKET_LOCK(queue) do {} while (0)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette