VirtualBox

Changeset 6951 in vbox for trunk/include


Ignore:
Timestamp:
Feb 14, 2008 2:09:52 PM (17 years ago)
Author:
vboxsync
Message:

Aligned the TLS destructor bits even more with posix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/thread.h

    r6946 r6951  
    374374
    375375/**
     376 * Thread termination callback for destroying a non-zero TLS entry.
     377 *
     378 * @remarks It is not permittable to use any RTTls APIs at this time. Doing so
     379 *          may lead to endless loops, crashes, and other bad stuff.
     380 *
     381 * @param   pvValue     The current value.
     382 */
     383typedef DECLCALLBACK(void) FNRTTLSDTOR(void *pvValue);
     384/** Pointer to a FNRTTLSDTOR. */
     385typedef FNRTTLSDTOR *PFNRTTLSDTOR;
     386
     387/**
    376388 * Allocates a TLS entry.
    377389 *
     
    385397 *
    386398 * @returns IPRT status code.
    387  * @param   piTls       Where to store the index of the allocated TLS entry.
    388  *                      This is set to NIL_RTTLS on failure.
    389  */
    390 RTR3DECL(int) RTTlsAllocEx(PRTTLS piTls);
     399 * @retval  VERR_NOT_SUPPORTED if pfnDestructor is non-NULL and the platform
     400 *          doesn't support this feature.
     401 *
     402 * @param   piTls           Where to store the index of the allocated TLS entry.
     403 *                          This is set to NIL_RTTLS on failure.
     404 * @param   pfnDestructor   Optional callback function for cleaning up on
     405 *                          thread termination. WARNING! This feature may not
     406 *                          be implemented everywhere.
     407 */
     408RTR3DECL(int) RTTlsAllocEx(PRTTLS piTls, PFNRTTLSDTOR pfnDestructor);
    391409
    392410/**
     
    427445RTR3DECL(int) RTTlsSet(RTTLS iTls, void *pvValue);
    428446
    429 /**
    430  * Thread termination callback for destroying a non-zero TLS entry.
    431  *
    432  * Registered and deregisterd by RTTlsSetDestructor().
    433  *
    434  * @remarks It is not permittable to use any RTTls APIs at this time. Doing so
    435  *          may lead to endless loops, crashes, and other bad stuff.
    436  *
    437  * @param   pvValue     The current value.
    438  */
    439 typedef DECLCALLBACK(void) FNRTTLSDTOR(void *pvValue);
    440 /** Pointer to a FNRTTLSDTOR. */
    441 typedef FNRTTLSDTOR *PFNRTTLSDTOR;
    442 
    443 /**
    444  * Register a thread termination destructor for a TLS entry.
    445  *
    446  * The destructor function will be called when a thread terminates
    447  * in a normal fashion and the TLS entry iTls of that thread is
    448  * not NULL.
    449  *
    450  * @remarks This is an optional feature and may therefore not be implemented
    451  *          on all platforms. VERR_NOT_SUPPORTED is returned then.
    452  *
    453  * @returns IPRT status code.
    454  * @retval  VERR_NOT_SUPPORTED if not supported on this platform.
    455  *
    456  * @param   iTls            The index of the TLS entry.
    457  * @param   pfnDestructor   Callback function. Use NULL to unregister a previously
    458  *                          registered destructor.
    459  *
    460  */
    461 RTR3DECL(int) RTTlsSetDestructor(RTTLS iTls, PFNRTTLSDTOR pfnDestructor);
    462 
    463 /**
    464  * Get pointer to the destructor function registered for the given TLS entry.
    465  *
    466  * @remarks This may not necessarily be implemented even if RTTlsSetDestructor is.
    467  *
    468  * @returns IPRT status code.
    469  * @retval  VERR_NOT_SUPPORTED if not supported on this platform.
    470  *
    471  * @param   iTls            The index of the TLS entry.
    472  * @param   ppfnDestructor  Where to store the destructor address.
    473  */
    474 PFNRTTLSDTOR RTTlsGetDestructor(RTTLS iTls, PFNRTTLSDTOR *ppfnDestructor);
    475 
    476447/** @} */
    477448
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette