]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Get rid of PhysMem's thread registration calls for most threads.
authorOliver Kurth <okurth@vmware.com>
Tue, 27 Aug 2019 19:55:37 +0000 (12:55 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 27 Aug 2019 19:55:37 +0000 (12:55 -0700)
A previous change eliminated the need to register threads before doing
a PPN to BPN conversion on them.  This change removes some of the
remaining infrastructure.

open-vm-tools/lib/hgfsServer/hgfsDirNotify.h
open-vm-tools/lib/hgfsServer/hgfsServer.c
open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestBd.c
open-vm-tools/lib/include/hgfsServer.h

index 4fe9daeefbb4392eee6bbeeb80d1d84f2599a3d8..0283497d62d6ad5b74f3d0eb417aa0b5f4260f54 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2009-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2009-2019 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -50,8 +50,6 @@ typedef enum {
 } HgfsNotifyActivateReason;
 
 /* These are the callbacks that are implemented in hgfsServer.c */
-typedef void (*HgfsNotifyRegisterThreadCb)(struct HgfsSessionInfo *session);
-typedef void (*HgfsNotifyUnregisterThreadCb)(struct HgfsSessionInfo *session);
 typedef void (*HgfsNotifyEventReceiveCb)(HgfsSharedFolderHandle sharedFolder,
                                          HgfsSubscriberHandle subscriber,
                                          char *name,
@@ -59,8 +57,6 @@ typedef void (*HgfsNotifyEventReceiveCb)(HgfsSharedFolderHandle sharedFolder,
                                          struct HgfsSessionInfo *session);
 
 typedef struct HgfsServerNotifyCallbacks {
-   HgfsNotifyRegisterThreadCb     registerThread;
-   HgfsNotifyUnregisterThreadCb   unregisterThread;
    HgfsNotifyEventReceiveCb       eventReceive;
 } HgfsServerNotifyCallbacks;
 
index 4622455110ae23e05439595641901a32b360265d..c404047f2a47819eeca793461a7a89c168843aa6 100644 (file)
@@ -246,8 +246,6 @@ static const HgfsServerCallbacks gHgfsServerCBTable = {
 };
 
 
-static void HgfsServerNotifyRegisterThreadCb(struct HgfsSessionInfo *session);
-static void HgfsServerNotifyUnregisterThreadCb(struct HgfsSessionInfo *session);
 static void HgfsServerNotifyReceiveEventCb(HgfsSharedFolderHandle sharedFolder,
                                            HgfsSubscriberHandle subscriber,
                                            char* fileName,
@@ -258,8 +256,6 @@ static void HgfsServerNotifyReceiveEventCb(HgfsSharedFolderHandle sharedFolder,
  * Callback table passed to the directory change notification component.
  */
 static const HgfsServerNotifyCallbacks gHgfsServerNotifyCBTable = {
-   HgfsServerNotifyRegisterThreadCb,
-   HgfsServerNotifyUnregisterThreadCb,
    HgfsServerNotifyReceiveEventCb,
 };
 
@@ -9227,76 +9223,6 @@ HgfsServerGetTargetRelativePath(const char* source,    // IN: source file name
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *
- * HgfsServerNotifyRegisterThreadCb --
- *
- *    The callback is invoked by the file system change notification component
- *    thread for generating change notification events.
- *    This simply calls back to the channel's register thread function, if present,
- *    which does the actual work.
- *
- * Results:
- *    None.
- *
- * Side effects:
- *    None
- *
- *-----------------------------------------------------------------------------
- */
-
-static void
-HgfsServerNotifyRegisterThreadCb(struct HgfsSessionInfo *session)     // IN: session info
-{
-   HgfsTransportSessionInfo *transportSession;
-
-   ASSERT(session);
-   transportSession = session->transportSession;
-
-   LOG(4, ("%s: Registering thread on session %"FMT64"x\n", __FUNCTION__, session->sessionId));
-
-   if (transportSession->channelCbTable->registerThread != NULL) {
-      transportSession->channelCbTable->registerThread();
-   }
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * HgfsServerNotifyUnregisterThreadCb --
- *
- *    The callback is invoked by the file system change notification component
- *    thread for generating change notification events.
- *    This simply calls back to the channel's unregister thread function, if present,
- *    which does the actual work.
- *
- * Results:
- *    None.
- *
- * Side effects:
- *    None
- *
- *-----------------------------------------------------------------------------
- */
-
-static void
-HgfsServerNotifyUnregisterThreadCb(struct HgfsSessionInfo *session)     // IN: session info
-{
-   HgfsTransportSessionInfo *transportSession;
-
-   ASSERT(session);
-   transportSession = session->transportSession;
-
-   LOG(4, ("%s: Unregistering thread on session %"FMT64"x\n", __FUNCTION__, session->sessionId));
-
-   if (transportSession->channelCbTable->unregisterThread != NULL) {
-      transportSession->channelCbTable->unregisterThread();
-   }
-}
-
-
 /*
  *-----------------------------------------------------------------------------
  *
index 844635d247044296195f557b7f4f2bccec3acf18..6da64ed37a662cdfdae20c41f146a8feb456419c 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2010-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2017,2019 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -347,8 +347,6 @@ HgfsChannelGuestConnConnect(HgfsGuestConn *connData)  // IN: our connection data
       HGFS_LARGE_PACKET_MAX
    };
 
-   connData->channelCbTable.registerThread = NULL;
-   connData->channelCbTable.unregisterThread = NULL;
    connData->channelCbTable.getWriteVa = NULL;
    connData->channelCbTable.getReadVa = NULL;
    connData->channelCbTable.putVa = NULL;
index 37bd54d55f64192cbad70b37d556508e31c1cfd4..4b1a5d2d79dfe2ad6eaa3c88856fe1e4a062cf57 100644 (file)
@@ -186,8 +186,6 @@ typedef void (*HgfsChannelRegisterThreadFunc)(void);
 typedef void (*HgfsChannelUnregisterThreadFunc)(void);
 
 typedef struct HgfsServerChannelCallbacks {
-   HgfsChannelRegisterThreadFunc registerThread;
-   HgfsChannelUnregisterThreadFunc unregisterThread;
    HgfsChannelMapVirtAddrFunc getReadVa;
    HgfsChannelMapVirtAddrFunc getWriteVa;
    HgfsChannelUnmapVirtAddrFunc putVa;