- Timestamp:
- Apr 29, 2004, 6:12:23 AM (22 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 3 edited
-
include/InnoTekLIBC/thread.h (modified) (1 diff, 1 prop)
-
src/lib/libc.def (modified) (1 diff, 1 prop)
-
src/lib/process/tls.c (modified) (5 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/thread.h
-
Property cvs2svn:cvs-rev
changed from
1.3to1.4
r1401 r1402 344 344 * this function. The result from doing that is undefined. 345 345 */ 346 int __libc_TLSDestructor(int iIndex, void (*pfnDestructor)(void *pvValue, unsigned fFlags), unsigned fFlags); 346 int __libc_TLSDestructor(int iIndex, void (*pfnDestructor)(void *pvValue, int iTLSIndex, unsigned fFlags), unsigned fFlags); 347 348 349 /** 350 * Get pointer to the destructor function registered for the given TLS entry. 351 * 352 * @returns NULL if invalid entry, errno set. 353 * @returns NULL if no entry registered. 354 * @returns Pointer to destructor if registered. 355 * 356 * @param iTLSIndex Value returned by __libc_TLSAlloc(). 357 * @param pfFlags Where to store the flags supplied to __libc_TLSDestructor(). 358 * NULL is ok. 359 */ 360 void (*__libc_TLSGetDestructor(int iTLSIndex, unsigned *pfFlags))(void *, int, unsigned); 347 361 348 362 /** @} */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/libc.def
-
Property cvs2svn:cvs-rev
changed from
1.55to1.56
r1401 r1402 1097 1097 "___libc_TLSDestructor" @1119 1098 1098 "___libc_ThreadRegisterTermCallback" @1120 1099 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/process/tls.c
-
Property cvs2svn:cvs-rev
changed from
1.4to1.5
r1401 r1402 69 69 70 70 /** TLS Per Thread Destructors. */ 71 static void (*gapfnDestructors[__LIBC_TLS_MAX])(void *, unsigned);71 static void (*gapfnDestructors[__LIBC_TLS_MAX])(void *, unsigned); 72 72 73 73 /** Thread Termination Registration Record. */ … … 157 157 */ 158 158 gapfnDestructors[iIndex] = NULL; 159 159 160 __atomic_clear_bit(&gauBitmap[0], iIndex); 160 161 … … 216 217 217 218 218 int __libc_TLSDestructor(int iIndex, void (*pfnDestructor)(void *pvValue, unsigned fFlags), unsigned fFlags)219 int __libc_TLSDestructor(int iIndex, void (*pfnDestructor)(void *pvValue, unsigned fFlags), unsigned fFlags) 219 220 { 220 221 LIBCLOG_ENTER("iIndex=%d pfnDestructor=%p\n", iIndex, pfnDestructor); … … 302 303 while (k < kEnd) 303 304 { 304 void (*pfnDestructor)(void *, unsigned); 305 void (*pfnDestructor)(void *, int, unsigned); 306 void *pvValue; 305 307 if ( __atomic_test_bit(&gauBitmap[0], k) 306 308 && k < __LIBC_TLS_MAX 307 && pThrd->apvTLS[k]309 && 308 310 && (pfnDestructor = gapfnDestructors[k]) != NULL) 309 311 { 310 312 LIBCLOG_MSG("tls %d: calling %p with %p\n", k, (void *)pfnDestructor, pThrd->apvTLS[k]); 311 pfnDestructor(pThrd->apvTLS[k], fFlags); 313 pThrd->apvTLS[k] = NULL; 314 pfnDestructor(pvValue, k, fFlags); 312 315 } 313 316 … … 321 324 LIBCLOG_RETURN_VOID(); 322 325 } 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
