VirtualBox

Changeset 25294 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Dec 10, 2009 12:57:31 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: docs

File:
1 edited

Legend:

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

    r23124 r25294  
    666666
    667667/**
    668  * Allocates a TLS entry.
     668 * Allocates a TLS entry (index). Before using an item of TLS, this must be called
     669 * once for the process; the RTTLS value returned is then typically stored in a global
     670 * or static variable. See RTTlsGet() for example code.
    669671 *
    670672 * @returns the index of the allocated TLS entry.
     
    674676
    675677/**
    676  * Allocates a TLS entry (with status code).
     678 * Allocates a TLS entry (index, with status code).
    677679 *
    678680 * @returns IPRT status code.
     
    697699
    698700/**
    699  * Get the value stored in a TLS entry.
     701 * Get the (thread-local) value stored in a TLS entry.
     702 * If RTTlsSet() has not yet been called, returns NULL.
     703 *
     704 * Example code:
     705 * <code>
     706 * RTTLS g_globalTLSIndex = NIL_RTTLS;
     707 *
     708 * ...
     709 *
     710 * // once for the process, allocate the TLS index
     711 * if (g_globalTLSIndex == NIL_RTTLS)
     712 *      g_globalTLSIndex = RTTlsAlloc();
     713 *
     714 * // get the thread-local value
     715 * void* pv = RTTlsGet(g_globalTLSIndex);
     716 *
     717 * </code>
    700718 *
    701719 * @returns value in given TLS entry.
     
    721739 * @param   pvValue     The value to store.
    722740 *
    723  * @remarks Note that NULL is considered to special value.
     741 * @remarks Note that NULL is considered a special value.
    724742 */
    725743RTR3DECL(int) RTTlsSet(RTTLS iTls, void *pvValue);
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