VirtualBox

Changeset 44472 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Jan 30, 2013 3:55:32 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83480
Message:

IPRT: Merging poll-win.cpp and poll-posix.cpp, part 2.

Location:
trunk/src/VBox/Runtime/r3
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/poll.cpp

    r44469 r44472  
    275275        pThis->paPollFds[i].revents = 0;
    276276
    277     int rc = poll(&pThis->paPollFds[0], pThis->cHandles,
    278                   cMillies == RT_INDEFINITE_WAIT || cMillies >= INT_MAX
    279                   ? -1
    280                   : (int)cMillies);
     277    rc = poll(&pThis->paPollFds[0], pThis->cHandles,
     278              cMillies == RT_INDEFINITE_WAIT || cMillies >= INT_MAX
     279              ? -1
     280              : (int)cMillies);
    281281    if (rc == 0)
    282282        return VERR_TIMEOUT;
  • trunk/src/VBox/Runtime/r3/posix/pipe-posix.cpp

    r40102 r44472  
    3636#include <iprt/err.h>
    3737#include <iprt/mem.h>
     38#include <iprt/poll.h>
    3839#include <iprt/string.h>
    3940#include <iprt/thread.h>
     
    5556#endif
    5657
     58#include "internal/pipe.h"
     59
    5760
    5861/*******************************************************************************
     
    668671}
    669672
     673
     674int rtPipePollGetHandle(RTPIPE hPipe, uint32_t fEvents, PRTHCINTPTR phNative)
     675{
     676    RTPIPEINTERNAL *pThis = hPipe;
     677    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     678    AssertReturn(pThis->u32Magic == RTPIPE_MAGIC, VERR_INVALID_HANDLE);
     679
     680    AssertReturn(!(fEvents & RTPOLL_EVT_READ)  || pThis->fRead,  VERR_INVALID_PARAMETER);
     681    AssertReturn(!(fEvents & RTPOLL_EVT_WRITE) || !pThis->fRead, VERR_INVALID_PARAMETER);
     682
     683    *phNative = pThis->fd;
     684    return VINF_SUCCESS;
     685}
     686
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