Changeset 26756 in vbox for trunk/include/iprt
- Timestamp:
- Feb 24, 2010 5:02:41 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58009
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/poll.h
r26731 r26756 56 56 * 57 57 * @returns IPRT status code. 58 * @param hPollSet The set to poll on. 59 * @param cMillies Number of milliseconds to wait. Use 60 * RT_INDEFINITE_WAIT to wait for ever. 61 * @param pfEvent Where to return details about the events that 62 * occured. Optional. 63 * @param pid Where to return the ID associated with the handle 64 * when calling RTPollSetAdd. Optional. 65 */ 66 RTDECL(int) RTPoll(RTPIPE hPipe, RTMSINTERVAL cMillies, uint32_t *pfEvent, uint32_t *pid); 58 * @retval VINF_SUCCESS if an event occured on a handle. Note that these 59 * @retval VERR_INVALID_HANDLE if @a hPollSet is invalid. 60 * @retval VERR_TIMEOUT if @a cMillies ellapsed without any events. 61 * @retval VERR_DEADLOCK if @a cMillies is set to RT_INDEFINITE_WAIT and there 62 * are no valid handles in the set. 63 * 64 * @param hPollSet The set to poll on. 65 * @param cMillies Number of milliseconds to wait. Use 66 * RT_INDEFINITE_WAIT to wait for ever. 67 * @param pfEvents Where to return details about the events that 68 * occured. Optional. 69 * @param pid Where to return the ID associated with the 70 * handle when calling RTPollSetAdd. Optional. 71 * 72 * @sa RTPollNoResume 73 */ 74 RTDECL(int) RTPoll(RTPOLLSET hPollSet, RTMSINTERVAL cMillies, uint32_t *pfEvents, uint32_t *pid); 75 76 /** 77 * Same as RTPoll except that it will return when interrupted. 78 * 79 * @returns IPRT status code. 80 * @retval VINF_SUCCESS if an event occured on a handle. Note that these 81 * @retval VERR_INVALID_HANDLE if @a hPollSet is invalid. 82 * @retval VERR_TIMEOUT if @a cMillies ellapsed without any events. 83 * @retval VERR_DEADLOCK if @a cMillies is set to RT_INDEFINITE_WAIT and there 84 * are no valid handles in the set. 85 * @retval VERR_INTERRUPTED if a signal or other asynchronous event interrupted 86 * the polling. 87 * 88 * @param hPollSet The set to poll on. 89 * @param cMillies Number of milliseconds to wait. Use 90 * RT_INDEFINITE_WAIT to wait for ever. 91 * @param pfEvents Where to return details about the events that 92 * occured. Optional. 93 * @param pid Where to return the ID associated with the 94 * handle when calling RTPollSetAdd. Optional. 95 */ 96 RTDECL(int) RTPollNoResume(RTPOLLSET hPollSet, RTMSINTERVAL cMillies, uint32_t *pfEvents, uint32_t *pid); 67 97 68 98 /** … … 70 100 * 71 101 * @returns IPRT status code. 72 * @param phPollSet Where to return the poll set handle.102 * @param phPollSet Where to return the poll set handle. 73 103 */ 74 104 RTDECL(int) RTPollSetCreate(PRTPOLLSET hPollSet); … … 78 108 * 79 109 * @returns IPRT status code. 80 * @param hPollSet The poll set to destroy. NIL_POLLSET is quietly81 * ignored (VINF_SUCCESS).110 * @param hPollSet The poll set to destroy. NIL_POLLSET is quietly 111 * ignored (VINF_SUCCESS). 82 112 */ 83 113 RTDECL(int) RTPollSetDestroy(RTPOLLSET hPollSet); … … 87 117 * 88 118 * @returns IPRT status code 89 * @param hPollSet The poll set to modify.90 * @param pHandle The handle to add.91 * @param fEvents Which events to poll for.92 * @param id The handle ID.119 * @param hPollSet The poll set to modify. 120 * @param pHandle The handle to add. 121 * @param fEvents Which events to poll for. 122 * @param id The handle ID. 93 123 */ 94 124 RTDECL(int) RTPollSetAdd(RTPOLLSET hPollSet, PCRTHANDLE pHandle, uint32_t fEvents, uint32_t id); … … 98 128 * 99 129 * @returns IPRT status code 100 * @param hPollSet The poll set to modify. 101 * @param id The handle ID of the handle that should be removed. 130 * @param hPollSet The poll set to modify. 131 * @param id The handle ID of the handle that should be 132 * removed. 102 133 */ 103 134 RTDECL(int) RTPollSetRemove(RTPOLLSET hPollSet, uint32_t id); 104 135 136 137 /** 138 * Query a handle in the poll set by it's ID. 139 * 140 * @returns IPRT status code 141 * @retval VINF_SUCCESS if the handle was found. @a *pHandle is set. 142 * @retval VERR_NOT_FOUND if there is no handle with that ID. 143 * @retval VERR_INVALID_HANDLE if @a hPollSet is invalid. 144 * 145 * @param hPollSet The poll set to query. 146 * @param id The ID of the handle. 147 * @param pHandle Where to return the handle details. Optional. 148 */ 149 RTDECL(int) RTPollSetQueryHandle(RTPOLLSET hPollSet, uint32_t id, PRTHANDLE pHandle); 150 151 /** 152 * Gets the number of handles in the set. 153 * 154 * @retval The handle count. 155 * @retval UINT32_MAX if @a hPollSet is invalid. 156 * 157 * @param hPollSet The poll set. 158 */ 159 RTDECL(uint32_t) RTPollSetCount(RTPOLLSET hPollSet); 160 105 161 /** 106 162 * Adds a pipe handle to the set. 107 163 * 108 164 * @returns IPRT status code. 109 * @param hPollSet The poll set.110 * @param hPipe The pipe handle.111 * @param fEvents Which events to poll for.112 * @param id The handle ID.165 * @param hPollSet The poll set. 166 * @param hPipe The pipe handle. 167 * @param fEvents Which events to poll for. 168 * @param id The handle ID. 113 169 * 114 170 * @todo Maybe we could figure out what to poll for depending on the kind of … … 127 183 * 128 184 * @returns IPRT status code. 129 * @param hPollSet The poll set.130 * @param hSocket The socket handle.131 * @param fEvents Which events to poll for.132 * @param id The handle ID.185 * @param hPollSet The poll set. 186 * @param hSocket The socket handle. 187 * @param fEvents Which events to poll for. 188 * @param id The handle ID. 133 189 */ 134 190 DECLINLINE(int) RTPollSetAddSocket(RTPOLLSET hPollSet, RTSOCKET hSocket, uint32_t fEvents, uint32_t id)
Note:
See TracChangeset
for help on using the changeset viewer.