VirtualBox

Changeset 47206 in vbox


Ignore:
Timestamp:
Jul 17, 2013 10:17:13 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
87319
Message:

IPRT: Kernel thread-context hooks, Solaris implementation.

Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/thread.h

    r47199 r47206  
    44
    55/*
    6  * Copyright (C) 2006-2012 Oracle Corporation
     6 * Copyright (C) 2006-2013 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    616616 * @returns IPRT status code.
    617617 * @param   phThreadCtx         Where to store the thread-context handle.
     618 *
     619 * @remarks Must be called with preemption enabled!
    618620 */
    619621RTDECL(int) RTThreadCtxHooksCreate(PRTTHREADCTX phThreadCtx);
     
    626628 *
    627629 * @param   phThreadCtx         Pointer to the thread-context handle.
     630 *
     631 * @remarks Must be called with preemption enabled!
    628632 */
    629633RTDECL(void) RTThreadCtxHooksDestroy(RTTHREADCTX hThreadCtx);
     
    638642 *                              for all thread-context events.
    639643 * @param   pvUser              User argument (optional, can be NULL).
     644 *
     645 * @remarks Can be called with preemption disabled.
    640646 */
    641647RTDECL(int) RTThreadCtxHooksRegister(RTTHREADCTX hThreadCtx, PFNRTTHREADCTXHOOK pfnThreadHook, void *pvUser);
     
    646652 * @returns IPRT status code.
    647653 * @param   phThreadCtx         Pointer to the thread-context handle.
     654 *
     655 * @remarks Can be called with preemption disabled.
    648656 */
    649657RTDECL(int) RTThreadCtxHooksDeregister(RTTHREADCTX hThreadCtx);
  • trunk/src/VBox/Runtime/Makefile.kmk

    r47199 r47206  
    19291929        r0drv/mpnotification-r0drv.c \
    19301930        r0drv/powernotification-r0drv.c \
    1931         r0drv/generic/threadctxhooks-r0drv-generic.cpp \
    19321931        r0drv/solaris/RTLogWriteDebugger-r0drv-solaris.c \
    19331932        r0drv/solaris/RTMpPokeCpu-r0drv-solaris.c \
     
    19481947        r0drv/solaris/thread-r0drv-solaris.c \
    19491948        r0drv/solaris/thread2-r0drv-solaris.c \
     1949        r0drv/solaris/threadctxhooks-r0drv-solaris.c \
    19501950        r0drv/solaris/time-r0drv-solaris.c \
    19511951        r0drv/solaris/timer-r0drv-solaris.c
  • trunk/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c

    r47199 r47206  
    4545*******************************************************************************/
    4646/**
    47  * The internal thread-context event.
     47 * The internal thread-context object.
    4848 */
    4949typedef struct RTTHREADCTXINT
     
    109109 * Worker function for RTThreadCtxHooks(Deregister|Destroy)().
    110110 *
    111  * @param   pThis   Pointer to the internal thread-context struct.
     111 * @param   pThis   Pointer to the internal thread-context object.
    112112 */
    113113DECLINLINE(void) rtThreadCtxHooksDeregister(PRTTHREADCTXINT pThis)
     
    150150    AssertMsgReturnVoid(pThis->u32Magic == RTTHREADCTXINT_MAGIC, ("pThis->u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis));
    151151    Assert(pThis->hOwner == RTThreadSelf());
     152    Assert(RTThreadPreemptIsEnabled(NIL_RTTHREAD));
    152153
    153154    /*
  • trunk/src/VBox/Runtime/r0drv/solaris/the-solaris-kernel.h

    r44528 r47206  
    5858#include <sys/ctf_api.h>
    5959#include <sys/modctl.h>
     60#include <sys/proc.h>
    6061
    6162#undef u /* /usr/include/sys/user.h:249:1 is where this is defined to (curproc->p_user). very cool. */
  • trunk/src/VBox/Runtime/testcase/tstR0ThreadPreemption.cpp

    r47199 r47206  
    55
    66/*
    7  * Copyright (C) 2009-2011 Oracle Corporation
     7 * Copyright (C) 2009-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    372372
    373373            RTThreadCtxHooksDeregister(hThreadCtx);
     374
     375            Assert(RTThreadPreemptIsEnabled(NIL_RTTHREAD));
    374376            RTThreadCtxHooksDestroy(hThreadCtx);
     377
    375378            RTMemFree(pCtxData);
    376379            break;
  • trunk/src/VBox/Runtime/testcase/tstR0ThreadPreemption.h

    r47199 r47206  
    55
    66/*
    7  * Copyright (C) 2009-2010 Oracle Corporation
     7 * Copyright (C) 2009-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/Runtime/testcase/tstR0ThreadPreemptionDriver.cpp

    r47199 r47206  
    55
    66/*
    7  * Copyright (C) 2009-2010 Oracle Corporation
     7 * Copyright (C) 2009-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette