Changeset 25294 in vbox for trunk/include/iprt
- Timestamp:
- Dec 10, 2009 12:57:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/thread.h
r23124 r25294 666 666 667 667 /** 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. 669 671 * 670 672 * @returns the index of the allocated TLS entry. … … 674 676 675 677 /** 676 * Allocates a TLS entry ( with status code).678 * Allocates a TLS entry (index, with status code). 677 679 * 678 680 * @returns IPRT status code. … … 697 699 698 700 /** 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> 700 718 * 701 719 * @returns value in given TLS entry. … … 721 739 * @param pvValue The value to store. 722 740 * 723 * @remarks Note that NULL is considered tospecial value.741 * @remarks Note that NULL is considered a special value. 724 742 */ 725 743 RTR3DECL(int) RTTlsSet(RTTLS iTls, void *pvValue);
Note:
See TracChangeset
for help on using the changeset viewer.