Changeset 47199 in vbox for trunk/include/iprt
- Timestamp:
- Jul 16, 2013 3:45:42 PM (11 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r46639 r47199 1592 1592 # define RTThreadCreateF RT_MANGLER(RTThreadCreateF) 1593 1593 # define RTThreadCreateV RT_MANGLER(RTThreadCreateV) 1594 # define RTThreadCtxHooksCreate RT_MANGLER(RTThreadCtxHooksCreate) /* r0drv */ 1595 # define RTThreadCtxHooksDeregister RT_MANGLER(RTThreadCtxHooksDeregister) /* r0drv */ 1596 # define RTThreadCtxHooksDestroy RT_MANGLER(RTThreadCtxHooksDestroy) /* r0drv */ 1597 # define RTThreadCtxHooksRegister RT_MANGLER(RTThreadCtxHooksRegister) /* r0drv */ 1594 1598 # define RTThreadFromNative RT_MANGLER(RTThreadFromNative) 1595 1599 # define RTThreadGetAffinity RT_MANGLER(RTThreadGetAffinity) -
trunk/include/iprt/thread.h
r43363 r47199 580 580 RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread); 581 581 582 583 /** 584 * Thread-context events. 585 */ 586 typedef enum RTTHREADCTXEVENT 587 { 588 /** This thread is about to be preempted. */ 589 RTTHREADCTXEVENT_PREEMPTING = 0, 590 /** This thread has just been resumed. */ 591 RTTHREADCTXEVENT_RESUMED, 592 /** The usual 32-bit size hack. */ 593 RTTHREADCTXEVENT_32BIT_HACK = 0x7fffffff 594 } RTTHREADCTXEVENT; 595 596 /** 597 * Thread-context hook. 598 * 599 * @returns IPRT status code. 600 * @param enmEvent The thread-context event. 601 * @param pvUser User argument. 602 * 603 * @remarks This function may be called under different contexts, i.e. with 604 * different locks held, with/without preemption disabled depending on 605 * the event in @a enmEvent. 606 */ 607 typedef DECLCALLBACK(void) FNRTTHREADCTXHOOK(RTTHREADCTXEVENT enmEvent, void *pvUser); 608 /** Pointer to a thread-context hook. */ 609 typedef FNRTTHREADCTXHOOK *PFNRTTHREADCTXHOOK; 610 611 /** 612 * Create a handle for a thread-context hook. 613 * 614 * This must be called once per-thread before using RTThreadCtxHooksRegister(). 615 * 616 * @returns IPRT status code. 617 * @param phThreadCtx Where to store the thread-context handle. 618 */ 619 RTDECL(int) RTThreadCtxHooksCreate(PRTTHREADCTX phThreadCtx); 620 621 /** 622 * Destroy a thread-context hook handle for the current thread. 623 * 624 * This will deregister any thread-context hooks registered under this handle if 625 * required. 626 * 627 * @param phThreadCtx Pointer to the thread-context handle. 628 */ 629 RTDECL(void) RTThreadCtxHooksDestroy(RTTHREADCTX hThreadCtx); 630 631 /** 632 * Registers a thread-context hook for the current thread to receive 633 * notifications for all supported thread-context events. 634 * 635 * @returns IPRT status code. 636 * @param phThreadCtx Poinner to the thread-context handle. 637 * @param pfnThreadHook Pointer to a thread-context hook (a callback) 638 * for all thread-context events. 639 * @param pvUser User argument (optional, can be NULL). 640 */ 641 RTDECL(int) RTThreadCtxHooksRegister(RTTHREADCTX hThreadCtx, PFNRTTHREADCTXHOOK pfnThreadHook, void *pvUser); 642 643 /** 644 * Deregisters a thread-context hook for the current thread. 645 * 646 * @returns IPRT status code. 647 * @param phThreadCtx Pointer to the thread-context handle. 648 */ 649 RTDECL(int) RTThreadCtxHooksDeregister(RTTHREADCTX hThreadCtx); 650 582 651 # endif /* IN_RING0 */ 583 652 -
trunk/include/iprt/types.h
r46688 r47199 1825 1825 #define NIL_RTTHREAD 0 1826 1826 1827 /** Thread-context handle.*/ 1828 typedef R0PTRTYPE(struct RTTHREADCTXINT *) RTTHREADCTX; 1829 /** Pointer to thread handle. */ 1830 typedef RTTHREADCTX *PRTTHREADCTX; 1831 /** Nil thread-context handle. */ 1832 #define NIL_RTTHREADCTX 0 1833 1827 1834 /** A TLS index. */ 1828 1835 typedef RTHCINTPTR RTTLS;
Note:
See TracChangeset
for help on using the changeset viewer.