VirtualBox

Changeset 26731 in vbox


Ignore:
Timestamp:
Feb 24, 2010 11:14:21 AM (15 years ago)
Author:
vboxsync
Message:

iprt/poll.h: adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/poll.h

    r26721 r26731  
    5959 * @param   cMillies        Number of milliseconds to wait.  Use
    6060 *                          RT_INDEFINITE_WAIT to wait for ever.
    61  * @param   pHandle         Where to return the info about the handle.
    6261 * @param   pfEvent         Where to return details about the events that
    63  *                          occured.
     62 *                          occured.  Optional.
     63 * @param   pid             Where to return the ID associated with the handle
     64 *                          when calling RTPollSetAdd.  Optional.
    6465 */
    65 RTDECL(int) RTPoll(RTPIPE hPipe, RTMSINTERVAL cMillies, uint32_t *pfEvent);
     66RTDECL(int) RTPoll(RTPIPE hPipe, RTMSINTERVAL cMillies, uint32_t *pfEvent, uint32_t *pid);
    6667
    6768/**
    68  * Creates a poll set with zero or more initial members.
     69 * Creates a poll set with no members.
    6970 *
    7071 * @returns IPRT status code.
    7172 * @param   phPollSet       Where to return the poll set handle.
    72  * @param   cHandles        The number of initial members.
    73  * @param   paHandles       Array with the initial members.
    74  * @param   pafEvents       Which events to poll for.  This is an array running
    75  *                          parallel to @a paHandles.  If NULL, we assume
    76  *                          RTPOLL_EVT_READ and RTPOLL_EVT_ERROR.
    7773 */
    78 RTDECL(int)  RTPollSetCreate(PRTPOLLSET hPollSet, size_t cHandles, PCRTHANDLE paHandles, uint32_t const *pafEvents);
     74RTDECL(int)  RTPollSetCreate(PRTPOLLSET hPollSet);
    7975
    8076/**
     
    9490 * @param   pHandle         The handle to add.
    9591 * @param   fEvents         Which events to poll for.
     92 * @param   id              The handle ID.
    9693 */
    97 RTDECL(int) RTPollSetAdd(RTPOLLSET hPollSet, PCRTHANDLE pHandle, uint32_t fEvents);
     94RTDECL(int) RTPollSetAdd(RTPOLLSET hPollSet, PCRTHANDLE pHandle, uint32_t fEvents, uint32_t id);
    9895
    9996/**
     
    10299 * @returns IPRT status code
    103100 * @param   hPollSet        The poll set to modify.
    104  * @param   pHandle         The handle to remove.
     101 * @param   id              The handle ID of the handle that should be removed.
    105102 */
    106 RTDECL(int) RTPollSetRemove(RTPOLLSET hPollSet, PCRTHANDLE pHandle);
     103RTDECL(int) RTPollSetRemove(RTPOLLSET hPollSet, uint32_t id);
    107104
    108105/**
     
    113110 * @param   hPipe           The pipe handle.
    114111 * @param   fEvents         Which events to poll for.
     112 * @param   id              The handle ID.
    115113 *
    116114 * @todo    Maybe we could figure out what to poll for depending on the kind of
    117115 *          pipe we're dealing with.
    118116 */
    119 DECLINLINE(int) RTPollSetAddPipe(RTPOLLSET hPollSet, RTPIPE hPipe, uint32_t fEvents)
     117DECLINLINE(int) RTPollSetAddPipe(RTPOLLSET hPollSet, RTPIPE hPipe, uint32_t fEvents, uint32_t id)
    120118{
    121119    RTHANDLE Handle;
    122120    Handle.enmType = RTHANDLETYPE_PIPE;
    123121    Handle.u.hPipe = hPipe;
    124     return RTPollSetAdd(hPollSet, &Handle, fEvents);
     122    return RTPollSetAdd(hPollSet, &Handle, fEvents, id);
    125123}
    126124
     
    132130 * @param   hSocket         The socket handle.
    133131 * @param   fEvents         Which events to poll for.
     132 * @param   id              The handle ID.
    134133 */
    135 DECLINLINE(int) RTPollSetAddSocket(RTPOLLSET hPollSet, RTSOCKET hSocket, uint32_t fEvents)
     134DECLINLINE(int) RTPollSetAddSocket(RTPOLLSET hPollSet, RTSOCKET hSocket, uint32_t fEvents, uint32_t id)
    136135{
    137136    RTHANDLE Handle;
    138137    Handle.enmType   = RTHANDLETYPE_SOCKET;
    139138    Handle.u.hSocket = hSocket;
    140     return RTPollSetAdd(hPollSet, &Handle, fEvents);
     139    return RTPollSetAdd(hPollSet, &Handle, fEvents, id);
    141140}
    142141
Note: See TracChangeset for help on using the changeset viewer.

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