Changeset 92507 in vbox
- Timestamp:
- Nov 19, 2021 1:57:29 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/iprt/mangling.h (modified) (1 diff)
-
include/iprt/thread.h (modified) (1 diff)
-
src/VBox/Runtime/r3/posix/thread-posix.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r92246 r92507 2512 2512 # define RTThreadIsSelfKnown RT_MANGLER(RTThreadIsSelfKnown) 2513 2513 # define RTThreadNativeSelf RT_MANGLER(RTThreadNativeSelf) 2514 # define RTThreadControlPokeSignal RT_MANGLER(RTThreadControlPokeSignal) /* not-win not-os2 */ 2514 2515 # define RTThreadPoke RT_MANGLER(RTThreadPoke) /* not-win not-os2 */ 2515 2516 # define RTThreadPreemptDisable RT_MANGLER(RTThreadPreemptDisable) /* r0drv */ -
trunk/include/iprt/thread.h
r90416 r92507 530 530 */ 531 531 RTDECL(int) RTThreadPoke(RTTHREAD hThread); 532 533 /** 534 * Controls the masking of the signal used by RTThreadPoke on posix systems. 535 * 536 * This function is not available on non-posix systems. 537 * 538 * @returns IPRT status code. 539 * 540 * @param hThread The current thread. 541 * @param fEnable Whether to enable poking (unblock) or to disable it 542 * (block the signal). 543 */ 544 RTDECL(int) RTThreadControlPokeSignal(RTTHREAD hThread, bool fEnable); 545 532 546 533 547 # ifdef IN_RING0 -
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r90392 r92507 641 641 642 642 #ifdef RTTHREAD_POSIX_WITH_POKE 643 643 644 RTDECL(int) RTThreadPoke(RTTHREAD hThread) 644 645 { … … 659 660 return rc; 660 661 } 662 663 664 RTDECL(int) RTThreadControlPokeSignal(RTTHREAD hThread, bool fEnable) 665 { 666 AssertReturn(hThread == RTThreadSelf() && hThread != NIL_RTTHREAD, VERR_INVALID_PARAMETER); 667 int rc; 668 if (g_iSigPokeThread != -1) 669 { 670 sigset_t SigSet; 671 sigemptyset(&SigSet); 672 sigaddset(&SigSet, g_iSigPokeThread); 673 674 int rc2 = sigprocmask(fEnable ? SIG_UNBLOCK : SIG_BLOCK, &SigSet, NULL); 675 if (rc2 == 0) 676 rc = VINF_SUCCESS; 677 else 678 { 679 rc = RTErrConvertFromErrno(errno); 680 AssertMsgFailed(("rc=%Rrc errno=%d (rc2=%d)\n", rc, errno, rc2)); 681 } 682 } 683 else 684 rc = VERR_NOT_SUPPORTED; 685 return rc; 686 } 687 688 661 689 #endif 662 690
Note:
See TracChangeset
for help on using the changeset viewer.

