Changeset 28113 in vbox
- Timestamp:
- Apr 8, 2010 8:11:33 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59831
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/sg.h
r28053 r28113 169 169 170 170 /** 171 * Advances the internal buffer pointer. 172 * 173 * @returns Number of bytes the pointer was moved forward. 174 * @param pSgBuf The S/G buffer. 175 * @param cbAdvance Number of bytes to move forward. 176 */ 177 RTDECL(size_t) RTSgBufAdvance(PRTSGBUF pSgBuf, size_t cbAdvance); 178 179 /** 171 180 * Constructs a new segment array starting from the current position 172 181 * and describing the given number of bytes. -
trunk/src/VBox/Runtime/common/misc/sg.cpp
r28053 r28113 250 250 251 251 252 RTDECL(size_t) RTSgBufAdvance(PRTSGBUF pSgBuf, size_t cbAdvance) 253 { 254 AssertPtrReturn(pSgBuf, 0); 255 256 size_t cbLeft = cbAdvance; 257 258 while (cbLeft) 259 { 260 size_t cbThisAdvance = cbLeft; 261 void *pv = sgBufGet(pSgBuf, &cbThisAdvance); 262 263 NOREF(pv); 264 265 if (!cbThisAdvance) 266 break; 267 268 cbLeft -= cbThisAdvance; 269 } 270 271 return cbAdvance - cbLeft; 272 } 273 274 252 275 RTDECL(size_t) RTSgBufSegArrayCreate(PRTSGBUF pSgBuf, PRTSGSEG paSeg, unsigned *pcSeg, size_t cbData) 253 276 {
Note:
See TracChangeset
for help on using the changeset viewer.