VirtualBox

Ignore:
Timestamp:
Apr 8, 2013 9:40:42 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
84843
Message:

GuestCtrl: Implemented using (public) VirtualBox events instead of own callback mechanisms. Bugfixes for testcases (still work in progress).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.h

    r45109 r45415  
    169169/**
    170170 * Structure for a guest session thread to
    171  * observe the forked session instance.
     171 * observe/control the forked session instance from
     172 * the VBoxService main executable.
    172173 */
    173174typedef struct VBOXSERVICECTRLSESSIONTHREAD
     
    243244typedef struct VBOXSERVICECTRLSESSION
    244245{
     246    /* The session's startup information. */
    245247    VBOXSERVICECTRLSESSIONSTARTUPINFO
    246248                                    StartupInfo;
    247     /** List of active guest control threads (VBOXSERVICECTRLTHREAD). */
    248     RTLISTANCHOR                    lstControlThreadsActive;
    249     /** List of inactive guest control threads (VBOXSERVICECTRLTHREAD). */
     249    /** List of active guest process threads (VBOXSERVICECTRLPROCESS). */
     250    RTLISTANCHOR                    lstProcessesActive;
     251    /** List of inactive guest process threads (VBOXSERVICECTRLPROCESS). */
    250252    /** @todo Still needed? */
    251     RTLISTANCHOR                    lstControlThreadsInactive;
     253    RTLISTANCHOR                    lstProcessesInactive;
    252254    /** List of guest control files (VBOXSERVICECTRLFILE). */
    253255    RTLISTANCHOR                    lstFiles;
    254     /** Critical section for protecting the guest process
    255      *  threading list. */
    256     RTCRITSECT                      csControlThreads;
     256    /** The session's critical section. */
     257    RTCRITSECT                      CritSect;
    257258    /** Session flags. */
    258259    uint32_t                        uFlags;
     
    330331    /** Critical section for thread-safe use. */
    331332    RTCRITSECT                      CritSect;
    332     /** @todo Document me! */
     333    /** Process startup information. */
     334    VBOXSERVICECTRLPROCSTARTUPINFO
     335                                    StartupInfo;
     336    /** The process' PID assigned by the guest OS. */
    333337    uint32_t                        uPID;
    334     char                           *pszCmd;
    335     uint32_t                        uFlags;
    336     char                          **papszArgs;
    337     uint32_t                        uNumArgs;
    338     char                          **papszEnv;
    339     uint32_t                        uNumEnvVars;
    340     /** Name of specified user account to run the
    341      *  guest process under. */
    342     char                           *pszUser;
    343     /** Password of specified user account. */
    344     char                           *pszPassword;
    345     /** Overall time limit (in ms) that the guest process
    346      *  is allowed to run. 0 for indefinite time. */
    347     uint32_t                        uTimeLimitMS;
    348338    /** Pointer to the current IPC request being
    349      *  processed. */
     339     *  processed. We only support one request at a
     340     *  time at the moment.
     341     ** @todo Implemenet a request queue. */
    350342    PVBOXSERVICECTRLREQUEST         pRequest;
    351343    /** StdIn pipe for addressing writes to the
     
    374366
    375367/* Guest session thread handling. */
    376 extern int                      GstCntlSessionThreadOpen(PRTLISTANCHOR pList, const PVBOXSERVICECTRLSESSIONSTARTUPINFO pSessionStartupInfo, PVBOXSERVICECTRLSESSIONTHREAD *ppSessionThread);
    377 extern int                      GstCntlSessionThreadClose(PVBOXSERVICECTRLSESSIONTHREAD pSession, uint32_t uFlags);
    378 extern int                      GstCntlSessionThreadCloseAll(PRTLISTANCHOR pList, uint32_t uFlags);
     368extern int                      GstCntlSessionThreadCreate(PRTLISTANCHOR pList, const PVBOXSERVICECTRLSESSIONSTARTUPINFO pSessionStartupInfo, PVBOXSERVICECTRLSESSIONTHREAD *ppSessionThread);
     369extern int                      GstCntlSessionThreadDestroy(PVBOXSERVICECTRLSESSIONTHREAD pSession, uint32_t uFlags);
     370extern int                      GstCntlSessionThreadDestroyAll(PRTLISTANCHOR pList, uint32_t uFlags);
    379371extern int                      GstCntlSessionThreadTerminate(PVBOXSERVICECTRLSESSIONTHREAD pSession);
    380372extern RTEXITCODE               VBoxServiceControlSessionForkInit(int argc, char **argv);
     
    392384extern int                      GstCntlProcessPerform(PVBOXSERVICECTRLPROCESS pProcess, PVBOXSERVICECTRLREQUEST pRequest);
    393385extern int                      GstCntlProcessStart(const PVBOXSERVICECTRLSESSION pSession, const PVBOXSERVICECTRLPROCSTARTUPINFO pStartupInfo, uint32_t uContext);
    394 extern int                      GstCntlProcessStop(const PVBOXSERVICECTRLPROCESS pThread);
    395 extern void                     GstCntlProcessRelease(const PVBOXSERVICECTRLPROCESS pThread);
    396 extern int                      GstCntlProcessWait(const PVBOXSERVICECTRLPROCESS pThread, RTMSINTERVAL msTimeout, int *prc);
    397 extern int                      GstCntlProcessFree(PVBOXSERVICECTRLPROCESS pThread);
     386extern int                      GstCntlProcessStop(PVBOXSERVICECTRLPROCESS pProcess);
     387extern void                     GstCntlProcessRelease(const PVBOXSERVICECTRLPROCESS pProcess);
     388extern int                      GstCntlProcessWait(const PVBOXSERVICECTRLPROCESS pProcess, RTMSINTERVAL msTimeout, int *pRc);
     389extern int                      GstCntlProcessFree(PVBOXSERVICECTRLPROCESS pProcess);
    398390/* Process request handling. */
    399391extern int                      GstCntlProcessRequestAlloc(PVBOXSERVICECTRLREQUEST *ppReq, VBOXSERVICECTRLREQUESTTYPE enmType);
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