VirtualBox

Ignore:
Timestamp:
Nov 12, 2020 10:30:55 AM (4 years ago)
Author:
vboxsync
Message:

Additions/VBoxClient: Big revamp of the internal service handling and termination fixes. A service now runs as part of a worker thread, while the main thread is used for initialization / shutdown and signal handling [build fix].

Location:
trunk/src/VBox/Additions/x11/VBoxClient
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r86871 r86873  
    440440#endif /* VBOX_WITH_SHARED_CLIPBOARD_FUSE */
    441441
    442 /** @copydoc VBCLSERVICE::pfnInit */
    443 static int vbclShClInit(void)
     442/**
     443 * @interface_method_impl{VBCLSERVICE,pfnInit}
     444 */
     445static DECLCALLBACK(int) vbclShClInit(void)
    444446{
    445447    int rc;
     
    455457}
    456458
    457 /** @copydoc VBCLSERVICE::pfnWorker */
    458 static int vbclShClWorker(bool volatile *pfShutdown)
     459/**
     460 * @interface_method_impl{VBCLSERVICE,pfnWorker}
     461 */
     462static DECLCALLBACK(int) vbclShClWorker(bool volatile *pfShutdown)
    459463{
    460464    RT_NOREF(pfShutdown);
     
    491495}
    492496
    493 /** @copydoc VBCLSERVICE::pfnStop */
    494 static void vbclShClStop(void)
     497/**
     498 * @interface_method_impl{VBCLSERVICE,pfnStop}
     499 */
     500static DECLCALLBACK(void) vbclShClStop(void)
    495501{
    496502    /* Disconnect from the host service.
     
    500506}
    501507
    502 /** @copydoc VBCLSERVICE::pfnTerm */
    503 static int vbclShClTerm(void)
     508/**
     509 * @interface_method_impl{VBCLSERVICE,pfnTerm}
     510 */
     511static DECLCALLBACK(int) vbclShClTerm(void)
    504512{
    505513#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r86871 r86873  
    760760}
    761761
    762 /** @copydoc VBCLSERVICE::pfnInit */
    763 static int vbclSVGAInit(void)
     762/**
     763 * @interface_method_impl{VBCLSERVICE,pfnInit}
     764 */
     765static DECLCALLBACK(int) vbclSVGAInit(void)
    764766{
    765767    /* In 32-bit guests GAs build on our release machines causes an xserver hang.
     
    789791}
    790792
    791 /** @copydoc VBCLSERVICE::pfnStop */
    792 static void vbclSVGAStop(void)
     793/**
     794 * @interface_method_impl{VBCLSERVICE,pfnStop}
     795 */
     796static DECLCALLBACK(void) vbclSVGAStop(void)
    793797{
    794798    if (mpMonitorPositions)
     
    13421346}
    13431347
    1344 static int vbclSVGAWorker(bool volatile *pfShutdown)
     1348/**
     1349 * @interface_method_impl{VBCLSERVICE,pfnWorker}
     1350 */
     1351static DECLCALLBACK(int) vbclSVGAWorker(bool volatile *pfShutdown)
    13451352{
    13461353    RT_NOREF(pfShutdown);
  • trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp

    r86871 r86873  
    35563556    return rc;
    35573557}
    3558 /** @copydoc VBCLSERVICE::pfnInit */
    3559 static int vbclDnDInit(void)
     3558/**
     3559 * @interface_method_impl{VBCLSERVICE,pfnInit}
     3560 */
     3561static DECLCALLBACK(int) vbclDnDInit(void)
    35603562{
    35613563    return g_Svc.init();
    35623564}
    35633565
    3564 /** @copydoc VBCLSERVICE::pfnWorker */
    3565 static int vbclDnDWorker(bool volatile *pfShutdown)
     3566/**
     3567 * @interface_method_impl{VBCLSERVICE,pfnWorker}
     3568 */
     3569static DECLCALLBACK(int) vbclDnDWorker(bool volatile *pfShutdown)
    35663570{
    35673571    return g_Svc.worker(pfShutdown);
    35683572}
    35693573
    3570 /** @copydoc VBCLSERVICE::pfnStop */
    3571 static void vbclDnDStop(void)
     3574/**
     3575 * @interface_method_impl{VBCLSERVICE,pfnStop}
     3576 */
     3577static DECLCALLBACK(void) vbclDnDStop(void)
    35723578{
    35733579    g_Svc.stop();
    35743580}
    35753581
    3576 /** @copydoc VBCLSERVICE::pfnTerm */
    3577 static int vbclDnDTerm(void)
     3582/**
     3583 * @interface_method_impl{VBCLSERVICE,pfnTerm}
     3584 */
     3585static DECLCALLBACK(int) vbclDnDTerm(void)
    35783586{
    35793587    return g_Svc.term();
  • trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp

    r86871 r86873  
    117117}
    118118
    119 /** @copydoc VBCLSERVICE::pfnWorker */
     119/**
     120 * @interface_method_impl{VBCLSERVICE,pfnWorker}
     121 */
    120122/** @todo Move this part in VbglR3 and just provide a callback for the platform-specific
    121123          notification stuff, since this is very similar to the VBoxTray code. */
    122 static int vbclHostVerWorker(bool volatile *pfShutdown)
     124static DECLCALLBACK(int) vbclHostVerWorker(bool volatile *pfShutdown)
    123125{
    124126    RT_NOREF(pfShutdown);
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp

    r86871 r86873  
    315315}
    316316
    317 /** @copydoc VBCLSERVICE::pfnInit */
    318 static int vbclSeamlessInit(void)
     317/**
     318 * @interface_method_impl{VBCLSERVICE,pfnInit}
     319 */
     320static DECLCALLBACK(int) vbclSeamlessInit(void)
    319321{
    320322    return g_Svc.mSeamless.init();
    321323}
    322324
    323 /** @copydoc VBCLSERVICE::pfnWorker */
    324 static int vbclSeamlessWorker(bool volatile *pfShutdown)
     325/**
     326 * @interface_method_impl{VBCLSERVICE,pfnWorker}
     327 */
     328static DECLCALLBACK(int) vbclSeamlessWorker(bool volatile *pfShutdown)
    325329{
    326330    return g_Svc.mSeamless.worker(pfShutdown);
    327331}
    328332
    329 /** @copydoc VBCLSERVICE::pfnStop */
    330 static void vbclSeamlessStop(void)
     333/**
     334 * @interface_method_impl{VBCLSERVICE,pfnStop}
     335 */
     336static DECLCALLBACK(void) vbclSeamlessStop(void)
    331337{
    332338    return g_Svc.mSeamless.stop();
    333339}
    334340
    335 /** @copydoc VBCLSERVICE::pfnTerm */
    336 static int vbclSeamlessTerm(void)
     341/**
     342 * @interface_method_impl{VBCLSERVICE,pfnTerm}
     343 */
     344static DECLCALLBACK(int) vbclSeamlessTerm(void)
    337345{
    338346    return g_Svc.mSeamless.term();
Note: See TracChangeset for help on using the changeset viewer.

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