Changeset 11018 in vbox for trunk/include/iprt
- Timestamp:
- Jul 30, 2008 10:40:35 PM (16 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cdefs.h
r10998 r11018 437 437 #else 438 438 # define RTCALL 439 #endif 440 441 /** @def RT_NO_THROW 442 * How to express that a function doesn't throw C++ exceptions 443 * and the compiler can thus save itself the bother of trying 444 * to catch any of them. Put this between the closing parenthesis 445 * and the semicolon in function prototypes. 446 */ 447 #ifdef __cplusplus 448 # define RT_NO_THROW throw() 449 #else 450 # define RT_NO_THROW 439 451 #endif 440 452 -
trunk/include/iprt/mem.h
r11017 r11018 70 70 * @param cb Size in bytes of the memory block to allocated. 71 71 */ 72 RTDECL(void *) RTMemTmpAlloc(size_t cb) ;72 RTDECL(void *) RTMemTmpAlloc(size_t cb) RT_NO_THROW; 73 73 74 74 /** … … 81 81 * @param cb Size in bytes of the memory block to allocated. 82 82 */ 83 RTDECL(void *) RTMemTmpAllocZ(size_t cb) ;83 RTDECL(void *) RTMemTmpAllocZ(size_t cb) RT_NO_THROW; 84 84 85 85 /** … … 88 88 * @param pv Pointer to memory block. 89 89 */ 90 RTDECL(void) RTMemTmpFree(void *pv) ;90 RTDECL(void) RTMemTmpFree(void *pv) RT_NO_THROW; 91 91 92 92 … … 98 98 * @param cb Size in bytes of the memory block to allocated. 99 99 */ 100 RTDECL(void *) RTMemAlloc(size_t cb) ;100 RTDECL(void *) RTMemAlloc(size_t cb) RT_NO_THROW; 101 101 102 102 /** … … 111 111 * @param cb Size in bytes of the memory block to allocated. 112 112 */ 113 RTDECL(void *) RTMemAllocZ(size_t cb) ;113 RTDECL(void *) RTMemAllocZ(size_t cb) RT_NO_THROW; 114 114 115 115 /** … … 121 121 * @param cb The amount of memory to duplicate. 122 122 */ 123 RTDECL(void *) RTMemDup(const void *pvSrc, size_t cb) ;123 RTDECL(void *) RTMemDup(const void *pvSrc, size_t cb) RT_NO_THROW; 124 124 125 125 /** … … 133 133 * @param cbExtra The amount of extra memory to allocate and zero. 134 134 */ 135 RTDECL(void *) RTMemDupEx(const void *pvSrc, size_t cbSrc, size_t cbExtra) ;135 RTDECL(void *) RTMemDupEx(const void *pvSrc, size_t cbSrc, size_t cbExtra) RT_NO_THROW; 136 136 137 137 /** … … 143 143 * @param cbNew The new block size (in bytes). 144 144 */ 145 RTDECL(void *) RTMemRealloc(void *pvOld, size_t cbNew) ;145 RTDECL(void *) RTMemRealloc(void *pvOld, size_t cbNew) RT_NO_THROW; 146 146 147 147 /** … … 150 150 * @param pv Pointer to memory block. 151 151 */ 152 RTDECL(void) RTMemFree(void *pv) ;152 RTDECL(void) RTMemFree(void *pv) RT_NO_THROW; 153 153 154 154 /** … … 159 159 * @param cb Size in bytes of the memory block to allocate. 160 160 */ 161 RTDECL(void *) RTMemExecAlloc(size_t cb) ;161 RTDECL(void *) RTMemExecAlloc(size_t cb) RT_NO_THROW; 162 162 163 163 /** … … 166 166 * @param pv Pointer to memory block. 167 167 */ 168 RTDECL(void) RTMemExecFree(void *pv) ;168 RTDECL(void) RTMemExecFree(void *pv) RT_NO_THROW; 169 169 170 170 #if defined(IN_RING0) && defined(RT_ARCH_AMD64) && defined(RT_OS_LINUX) … … 184 184 * @param cb The size of the memory block. 185 185 */ 186 RTR0DECL(int) RTR0MemExecDonate(void *pvMemory, size_t cb) ;186 RTR0DECL(int) RTR0MemExecDonate(void *pvMemory, size_t cb) RT_NO_THROW; 187 187 #endif /* R0+AMD64+LINUX */ 188 188 … … 194 194 * @param cb Size of the memory block. Will be rounded up to page size. 195 195 */ 196 RTDECL(void *) RTMemPageAlloc(size_t cb) ;196 RTDECL(void *) RTMemPageAlloc(size_t cb) RT_NO_THROW; 197 197 198 198 /** … … 203 203 * @param cb Size of the memory block. Will be rounded up to page size. 204 204 */ 205 RTDECL(void *) RTMemPageAllocZ(size_t cb) ;205 RTDECL(void *) RTMemPageAllocZ(size_t cb) RT_NO_THROW; 206 206 207 207 /** … … 211 211 * NULL will be ignored. 212 212 */ 213 RTDECL(void) RTMemPageFree(void *pv) ;213 RTDECL(void) RTMemPageFree(void *pv) RT_NO_THROW; 214 214 215 215 /** Page level protection flags for RTMemProtect(). … … 234 234 * @param fProtect The new protection, a combination of the RTMEM_PROT_* defines. 235 235 */ 236 RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) ;236 RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) RT_NO_THROW; 237 237 238 238 … … 248 248 * rounded up to PAGE_SIZE. 249 249 */ 250 RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb) ;250 RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb) RT_NO_THROW; 251 251 252 252 /** … … 256 256 * @param cb The cb parameter passed to RTMemContAlloc(). 257 257 */ 258 RTR0DECL(void) RTMemContFree(void *pv, size_t cb) ;258 RTR0DECL(void) RTMemContFree(void *pv, size_t cb) RT_NO_THROW; 259 259 260 260 #endif … … 272 272 * @param cb Size in bytes of the memory block to allocate. 273 273 */ 274 RTDECL(void *) RTMemEfTmpAlloc(size_t cb) ;274 RTDECL(void *) RTMemEfTmpAlloc(size_t cb) RT_NO_THROW; 275 275 276 276 /** … … 281 281 * @param cb Size in bytes of the memory block to allocate. 282 282 */ 283 RTDECL(void *) RTMemEfTmpAllocZ(size_t cb) ;283 RTDECL(void *) RTMemEfTmpAllocZ(size_t cb) RT_NO_THROW; 284 284 285 285 /** … … 288 288 * @param pv Pointer to memory block. 289 289 */ 290 RTDECL(void) RTMemEfTmpFree(void *pv) ;290 RTDECL(void) RTMemEfTmpFree(void *pv) RT_NO_THROW; 291 291 292 292 /** … … 297 297 * @param cb Size in bytes of the memory block to allocate. 298 298 */ 299 RTDECL(void *) RTMemEfAlloc(size_t cb) ;299 RTDECL(void *) RTMemEfAlloc(size_t cb) RT_NO_THROW; 300 300 301 301 /** … … 306 306 * @param cb Size in bytes of the memory block to allocate. 307 307 */ 308 RTDECL(void *) RTMemEfAllocZ(size_t cb) ;308 RTDECL(void *) RTMemEfAllocZ(size_t cb) RT_NO_THROW; 309 309 310 310 /** … … 316 316 * @param cbNew The new block size (in bytes). 317 317 */ 318 RTDECL(void *) RTMemEfRealloc(void *pvOld, size_t cbNew) ;318 RTDECL(void *) RTMemEfRealloc(void *pvOld, size_t cbNew) RT_NO_THROW; 319 319 320 320 /** … … 323 323 * @param pv Pointer to memory block. 324 324 */ 325 RTDECL(void) RTMemEfFree(void *pv) ;325 RTDECL(void) RTMemEfFree(void *pv) RT_NO_THROW; 326 326 327 327 /** … … 333 333 * @param cb The amount of memory to duplicate. 334 334 */ 335 RTDECL(void *) RTMemEfDup(const void *pvSrc, size_t cb) ;335 RTDECL(void *) RTMemEfDup(const void *pvSrc, size_t cb) RT_NO_THROW; 336 336 337 337 /** … … 344 344 * @param cbExtra The amount of extra memory to allocate and zero. 345 345 */ 346 RTDECL(void *) RTMemEfDupEx(const void *pvSrc, size_t cbSrc, size_t cbExtra) ;346 RTDECL(void *) RTMemEfDupEx(const void *pvSrc, size_t cbSrc, size_t cbExtra) RT_NO_THROW; 347 347 348 348 /** @def RTMEM_WRAP_TO_EF_APIS … … 382 382 */ 383 383 template <class T> 384 inline void RTMemAutoDestructor(T *aMem) 384 inline void RTMemAutoDestructor(T *aMem) RT_NO_THROW 385 385 { 386 386 RTMemFree(aMem); … … 395 395 * @param cbNew The amount of memory to allocate (in bytes). 396 396 */ 397 inline void *RTMemTmpAutoAllocator(void *pvOld, size_t cbNew) 397 inline void *RTMemTmpAutoAllocator(void *pvOld, size_t cbNew) RT_NO_THROW 398 398 { 399 399 AssertReturn(!pvOld, NULL); … … 413 413 */ 414 414 template <class T> 415 inline void RTMemTmpAutoDestructor(T *aMem) 415 inline void RTMemTmpAutoDestructor(T *aMem) RT_NO_THROW 416 416 { 417 417 RTMemTmpFree(aMem); … … 431 431 */ 432 432 template <class T> 433 inline void RTMemEfAutoFree(T *aMem) 433 inline void RTMemEfAutoFree(T *aMem) RT_NO_THROW 434 434 { 435 435 RTMemEfFree(aMem); … … 445 445 */ 446 446 template <class T> 447 inline T * RTMemAutoNil(void) 447 inline T * RTMemAutoNil(void) RT_NO_THROW 448 448 { 449 449 return (T *)(NULL); -
trunk/include/iprt/rand.h
r8245 r11018 47 47 * @param cb Number of bytes to generate. 48 48 */ 49 RTDECL(void) RTRandBytes(void *pv, size_t cb) ;49 RTDECL(void) RTRandBytes(void *pv, size_t cb) RT_NO_THROW; 50 50 51 51 /** … … 56 56 * @param i32Last Last number in the set. 57 57 */ 58 RTDECL(int32_t) RTRandS32Ex(int32_t i32First, int32_t i32Last) ;58 RTDECL(int32_t) RTRandS32Ex(int32_t i32First, int32_t i32Last) RT_NO_THROW; 59 59 60 60 /** … … 63 63 * @returns The random number. 64 64 */ 65 RTDECL(int32_t) RTRandS32(void) ;65 RTDECL(int32_t) RTRandS32(void) RT_NO_THROW; 66 66 67 67 /** … … 72 72 * @param u32Last Last number in the set. 73 73 */ 74 RTDECL(uint32_t) RTRandU32Ex(uint32_t u32First, uint32_t u32Last) ;74 RTDECL(uint32_t) RTRandU32Ex(uint32_t u32First, uint32_t u32Last) RT_NO_THROW; 75 75 76 76 /** … … 79 79 * @returns The random number. 80 80 */ 81 RTDECL(uint32_t) RTRandU32(void) ;81 RTDECL(uint32_t) RTRandU32(void) RT_NO_THROW; 82 82 83 83 /** … … 88 88 * @param i64Last Last number in the set. 89 89 */ 90 RTDECL(int64_t) RTRandS64Ex(int64_t i64First, int64_t i64Last) ;90 RTDECL(int64_t) RTRandS64Ex(int64_t i64First, int64_t i64Last) RT_NO_THROW; 91 91 92 92 /** … … 95 95 * @returns The random number. 96 96 */ 97 RTDECL(int64_t) RTRandS64(void) ;97 RTDECL(int64_t) RTRandS64(void) RT_NO_THROW; 98 98 99 99 /** … … 104 104 * @param u64Last Last number in the set. 105 105 */ 106 RTDECL(uint64_t) RTRandU64Ex(uint64_t u64First, uint64_t u64Last) ;106 RTDECL(uint64_t) RTRandU64Ex(uint64_t u64First, uint64_t u64Last) RT_NO_THROW; 107 107 108 108 /** … … 111 111 * @returns The random number. 112 112 */ 113 RTDECL(uint64_t) RTRandU64(void) ;113 RTDECL(uint64_t) RTRandU64(void) RT_NO_THROW; 114 114 115 115 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.