From: VMware, Inc <> Date: Thu, 17 Jun 2010 22:19:55 +0000 (-0700) Subject: Slay thread watchdog. X-Git-Tag: 2010.06.16-268169~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e0b8aed5bda5fb177c0ce2f1b552aee62f1bc8a;p=thirdparty%2Fopen-vm-tools.git Slay thread watchdog. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/include/userlock.h b/open-vm-tools/lib/include/userlock.h index f5d36567e..f3bf5d4d8 100644 --- a/open-vm-tools/lib/include/userlock.h +++ b/open-vm-tools/lib/include/userlock.h @@ -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, diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index 046793246..3537c028c 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -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; diff --git a/open-vm-tools/lib/lock/ul.c b/open-vm-tools/lib/lock/ul.c index 251c1888e..e7cece736 100644 --- a/open-vm-tools/lib/lock/ul.c +++ b/open-vm-tools/lib/lock/ul.c @@ -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; -} diff --git a/open-vm-tools/lib/lock/ulIntShared.h b/open-vm-tools/lib/lock/ulIntShared.h index 08604a485..9e2d439c4 100644 --- a/open-vm-tools/lib/lock/ulIntShared.h +++ b/open-vm-tools/lib/lock/ulIntShared.h @@ -19,8 +19,6 @@ #ifndef _ULINTSHARED_H_ #define _ULINTSHARED_H_ -extern void (*MXUserVThreadWatchDog)(void); - extern void MXUserListLocks(void); extern void MXUserInstallMxHooks(void (*theLockListFunc)(void), diff --git a/open-vm-tools/lib/user/util.c b/open-vm-tools/lib/user/util.c index d6e229a5f..c331c15ba 100644 --- a/open-vm-tools/lib/user/util.c +++ b/open-vm-tools/lib/user/util.c @@ -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 }