Changeset 86725 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- Oct 28, 2020 9:21:24 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r82968 r86725 194 194 RT_ZERO(SigAct); 195 195 SigAct.sa_handler = rtThreadPosixPokeSignal; 196 SigAct.sa_flags = 0; 196 SigAct.sa_flags = 0; /* no SA_RESTART! */ 197 197 sigfillset(&SigAct.sa_mask); 198 198 … … 249 249 sigprocmask(SIG_BLOCK, &SigSet, NULL); 250 250 } 251 #ifdef RTTHREAD_POSIX_WITH_POKE 251 252 #ifdef RTTHREAD_POSIX_WITH_POKE 253 /* 254 * bird 2020-10-28: Not entirely sure we do this, but it makes sure the signal works 255 * on the new thread. Probably some pre-NPTL linux reasons. 256 */ 252 257 if (g_iSigPokeThread != -1) 258 { 259 # if 1 /* siginterrupt() is typically implemented as two sigaction calls, this should be faster and w/o deprecations: */ 260 struct sigaction SigActOld; 261 RT_ZERO(SigActOld); 262 263 struct sigaction SigAct; 264 RT_ZERO(SigAct); 265 SigAct.sa_handler = rtThreadPosixPokeSignal; 266 SigAct.sa_flags = 0; /* no SA_RESTART! */ 267 sigfillset(&SigAct.sa_mask); 268 269 int rc = sigaction(g_iSigPokeThread, &SigAct, &SigActOld); 270 AssertMsg(rc == 0, ("rc=%Rrc errno=%d\n", RTErrConvertFromErrno(errno), errno)); 271 AssertMsg(rc || SigActOld.sa_handler == rtThreadPosixPokeSignal, ("%p\n", SigActOld.sa_handler)); 272 # else 253 273 siginterrupt(g_iSigPokeThread, 1); 274 # endif 275 } 254 276 #endif 255 277 }
Note:
See TracChangeset
for help on using the changeset viewer.