Changeset 96519 in vbox
- Timestamp:
- Aug 26, 2022 12:20:35 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 153384
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r96407 r96519 41 41 #define LOG_GROUP RTLOGGROUP_THREAD 42 42 #include <errno.h> 43 #include <limits.h> 43 44 #include <pthread.h> 44 45 #include <signal.h> … … 99 100 * Global Variables * 100 101 *********************************************************************************************************************************/ 101 /** The pthread key in which we store the pointer to our own PRTTHREAD structure. */ 102 static pthread_key_t g_SelfKey; 102 /** The pthread key in which we store the pointer to our own PRTTHREAD structure. 103 * @note There is a defined NIL value here, nor can we really assume this is an 104 * integer. However, zero is a valid key on Linux, so we get into trouble 105 * if we accidentally use it uninitialized. 106 * 107 * So, we ASSUME it's a integer value and the valid range is in approx 0 108 * to PTHREAD_KEYS_MAX. Solaris has at least one negative value (-1) 109 * defined. Thus, we go for 16 MAX values below zero and keep our fingers 110 * cross that it will always be an invalid key value everywhere... 111 * 112 * See also NIL_RTTLS, which is -1. 113 */ 114 static pthread_key_t g_SelfKey = (pthread_key_t)(-PTHREAD_KEYS_MAX * 16); 103 115 #ifdef RTTHREAD_POSIX_WITH_POKE 104 116 /** The signal we use for poking threads.
Note:
See TracChangeset
for help on using the changeset viewer.