]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Slay thread watchdog.
authorVMware, Inc <>
Thu, 17 Jun 2010 22:19:55 +0000 (15:19 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 17 Jun 2010 22:19:55 +0000 (15:19 -0700)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/include/userlock.h
open-vm-tools/lib/include/vm_basic_defs.h
open-vm-tools/lib/lock/ul.c
open-vm-tools/lib/lock/ulIntShared.h
open-vm-tools/lib/user/util.c

index f5d36567efd079349da2d3aad00bea8aaca0a98b..f3bf5d4d8cc1140da2822eb78af0e0bb22b41836 100644 (file)
@@ -149,8 +149,6 @@ void MXUser_DestroyCondVar(MXUserCondVar *condVar);
 
 struct MX_MutexRec;
 
-void MXUser_PlantThreadWatchDog(void (*func)(void));
-
 #if defined(VMX86_VMX)
 MXUserRecLock *MXUser_InitFromMXRec(const char *name,
                                     struct MX_MutexRec *mutex,
index 046793246bd06445d0fec04c8303ebbdc7d0bdc8..3537c028c9bc8dd6a73028af35703bd13d36e220 100644 (file)
@@ -433,7 +433,7 @@ sleep(unsigned int sec)
 static INLINE void
 usleep(unsigned long usec)
 {
-   Sleep(CEILING(usec, 1000));
+   Sleep(CEILING(usec/1000, 1000));
 }
 
 typedef int pid_t;
index 251c1888e22261abe308b1df6adb1d121398609c..e7cece7360b5b6b93909380be52b097ec37a8509 100644 (file)
@@ -27,8 +27,6 @@
 
 static Bool mxInPanic = FALSE;  // track when involved in a panic
 
-void (*MXUserVThreadWatchDog)(void);
-
 Bool (*MXUserTryAcquireForceFail)() = NULL;
 
 static MX_Rank (*MXUserMxCheckRank)(void) = NULL;
@@ -645,28 +643,3 @@ MXUserListLocks(void)
    }
 #endif
 }
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * MXUser_PlantThreadWatchDog --
- *
- *      Plant the pointer to VThread_WatchDog.
- *
- *      If this is called lib/thread is around.
- *
- * Results:
- *      None
- *
- * Side effects:
- *      None
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-MXUser_PlantThreadWatchDog(void (*func)(void))
-{
-   MXUserVThreadWatchDog = func;
-}
index 08604a48549a676632612969affa27a1a32ab4eb..9e2d439c41757fe281423d5a6113530543c269b8 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef _ULINTSHARED_H_
 #define _ULINTSHARED_H_
 
-extern void (*MXUserVThreadWatchDog)(void);
-
 extern void MXUserListLocks(void);
 
 extern void MXUserInstallMxHooks(void (*theLockListFunc)(void),
index d6e229a5f9e73489bf4948a73c80f1d9b9a1b712..c331c15ba82aebd4b2e1176cd3bfb07a7c3fc18d 100644 (file)
@@ -1112,7 +1112,8 @@ Util_MakeSureDirExistsAndAccessible(char const *path,  // IN
  *
  *    On Win32, terminate the process and all of its threads, without
  *    calling any of the DLL termination handlers.
- *    On Linux, call exit().
+
+ *    On Linux, call _exit().
  *
  * Results:
  *    None
@@ -1127,9 +1128,9 @@ void
 Util_ExitProcessAbruptly(int code) // IN
 {
 #if defined(_WIN32)
-   TerminateProcess(GetCurrentProcess(),code);
+   TerminateProcess(GetCurrentProcess(), code);
 #else
-   exit(code);
+   _exit(code);
 #endif
 }