################################################################################
-### Copyright (C) 2007-2016 VMware, Inc. All rights reserved.
+### Copyright (C) 2007-2016, 2020 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libHgfsServer_la_SOURCES += hgfsServerParameters.c
libHgfsServer_la_SOURCES += hgfsServerOplock.c
libHgfsServer_la_SOURCES += hgfsServerOplockLinux.c
+libHgfsServer_la_SOURCES += hgfsThreadpoolStub.c
AM_CFLAGS =
AM_CFLAGS += -DVMTOOLS_USE_GLIB
--- /dev/null
+/*********************************************************
+ * Copyright (C) 2020 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ *********************************************************/
+
+#ifndef _HGFS_THREADPOOL_H
+#define _HGFS_THREADPOOL_H
+
+/*
+ * hgfsThreadpool.h --
+ *
+ * Function definitions for threadpool.
+ */
+
+#include "hgfsUtil.h" // for HgfsInternalStatus
+#include "hgfsServerInt.h" // for HgfsSessionInfo
+
+/*
+ * The maximum count of thread in threadpool.
+ * For Windows 10 guest, the file explorer issues 8 asynchronous request
+ * at one time.
+ * Please keep this value same with the PHYSMEM_HGFS_WORKER_THREADS
+ */
+#define HGFS_THREADPOOL_MAX_COUNT 10
+
+typedef void(*HgfsThreadpoolWorkItem)(void *data);
+
+HgfsInternalStatus HgfsThreadpool_Init(void);
+
+Bool HgfsThreadpool_Activate(void);
+void HgfsThreadpool_Deactivate(void);
+
+void HgfsThreadpool_Exit(void);
+Bool HgfsThreadpool_QueueWorkItem(HgfsThreadpoolWorkItem workItem, void *data);
+
+#endif // _HGFS_THREADPOOL_H
--- /dev/null
+/*********************************************************
+ * Copyright (C) 2020 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
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * hgfsThreadPoolStub.c --
+ *
+ * Stubs for threadpool support, used to build guest components.
+ */
+
+#include "vmware.h"
+#include "vm_basic_types.h"
+#include "util.h"
+
+#include "hgfsProto.h"
+#include "hgfsServer.h"
+#include "hgfsThreadpool.h"
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsThreadpool_Init --
+ *
+ * Initialization of the threadpool component.
+ *
+ * Results:
+ * 0 if success, error code otherwise.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+HgfsInternalStatus
+HgfsThreadpool_Init(void)
+{
+ return HGFS_ERROR_NOT_SUPPORTED;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsThreadpool_Activate --
+ *
+ * Activate the threadpool.
+ *
+ * Results:
+ * Always return FALSE.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+HgfsThreadpool_Activate(void)
+{
+ return FALSE;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsThreadpool_Deactivate --
+ *
+ * Deactivate the threadpool.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+HgfsThreadpool_Deactivate(void)
+{
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsThreadpool_Exit --
+ *
+ * Exit for the threadpool component.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+HgfsThreadpool_Exit(void)
+{
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * HgfsThreadpool_QueueWorkItem --
+ *
+ * Execute a work item.
+ *
+ * Results:
+ * TRUE if the work item is queued successfully,
+ * FALSE if the work item is not queued.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Bool
+HgfsThreadpool_QueueWorkItem(HgfsThreadpoolWorkItem workItem, // IN
+ void *data) // IN
+{
+ return FALSE;
+}
+
/*********************************************************
- * Copyright (C) 1998-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2020 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
#define HGFS_CONFIG_VOL_INFO_MIN (1 << 2)
#define HGFS_CONFIG_OPLOCK_ENABLED (1 << 3)
#define HGFS_CONFIG_SHARE_ALL_HOST_DRIVES_ENABLED (1 << 4)
+#define HGFS_CONFIG_THREADPOOL_ENABLED (1 << 5)
typedef struct HgfsServerConfig {
HgfsConfigFlags flags;
} HgfsServerMgrCallbacks;
typedef enum {
+ HGFS_QUIESCE_CHANNEL_FREEZE, /*Op sent before the channel device quiesce*/
HGFS_QUIESCE_FREEZE,
HGFS_QUIESCE_THAW,
} HgfsQuiesceOp;
/*********************************************************
- * Copyright (C) 2010-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2020 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
#define RANK_hgfsFileIOLock (RANK_libLockBase + 0x4050)
#define RANK_hgfsSearchArrayLock (RANK_libLockBase + 0x4060)
#define RANK_hgfsNodeArrayLock (RANK_libLockBase + 0x4070)
+#define RANK_hgfsActivateLock (RANK_libLockBase + 0x4080)
+#define RANK_hgfsThreadpoolLock (RANK_libLockBase + 0x4090)
/*
* vigor (must be < VMDB range and < disklib, see bug 741290)