vbox的更動 6951 路徑 trunk/src/VBox/Runtime/r3/os2
- 時間撮記:
- 2008-2-14 下午02:09:52 (17 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/os2/thread-os2.cpp
r6946 r6951 229 229 230 230 231 RTR3DECL(int) RTTlsAllocEx(PRTTLS piTls) 232 { 231 RTR3DECL(int) RTTlsAllocEx(PRTTLS piTls, PFNRTTLSDTOR pfnDestructor) 232 { 233 int rc; 233 234 int iTls = __libc_TLSAlloc(); 234 235 if (iTls != -1) 235 return iTls; 236 return RTErrConvertFromErrno(errno); 236 { 237 if ( !pfnDestructor 238 || __libc_TLSDestructor(iTls, (void (*)(void *, int, unsigned))pfnDestructor, fFlags) != -1) 239 { 240 *piTls = iTls; 241 return VINF_SUCCESS; 242 } 243 244 rc = RTErrConvertFromErrno(errno); 245 __libc_TLSFree(iTls); 246 } 247 else 248 rc = RTErrConvertFromErrno(errno); 249 250 *piTls = NIL_RTTLS; 251 return rc; 237 252 } 238 253 … … 278 293 } 279 294 280 281 RTR3DECL(int) RTTlsSetDestructor(RTTLS iTls, PFNRTTLSDTOR pfnDestructor)282 {283 AssertReturn(!fFlags, VERR_INVALID_PARAMETER)284 if (__libc_TLSDestructor(iTls, (void (*)(void *, int, unsigned))pfnDestructor, fFlags) == -1)285 return VINF_SUCCESS;286 return RTErrConvertFromErrno(errno);287 }288 289 290 PFNRTTLSDTOR RTTlsGetDestructor(RTTLS iTls, PFNRTTLSDTOR *ppfnDestructor)291 {292 unsigned fFlags;293 errno = 0;294 *ppfnDestructor = (PFNRTTLSDTOR)__libc_TLSGetDestructor(iTls, &fFlags);295 if (!*ppfnDestructor && errno)296 return RTErrConvertFromErrno(errno);297 return VINF_SUCCESS;298 }299
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器