summaryrefslogtreecommitdiff
path: root/indra/llvfs/llpidlock.h
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2009-01-17 01:29:45 +0000
committerAndrew Meadows <andrew@lindenlab.com>2009-01-17 01:29:45 +0000
commit15a6d273cc00e1f4f9f9d56d8c878b46b283b289 (patch)
treef4ac9fa1f96c6d246b571412ce6a67ee1837794d /indra/llvfs/llpidlock.h
parent446c55538e1fb12d8a1feb541edf99c16bb29121 (diff)
svn merge -r108142:108148 svn+ssh://svn.lindenlab.com/svn/linden/qa/maint-server/maint-server-5-r108113
Diffstat (limited to 'indra/llvfs/llpidlock.h')
-rwxr-xr-xindra/llvfs/llpidlock.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/indra/llvfs/llpidlock.h b/indra/llvfs/llpidlock.h
new file mode 100755
index 0000000000..44ed8caf46
--- /dev/null
+++ b/indra/llvfs/llpidlock.h
@@ -0,0 +1,72 @@
+/**
+ * @file llpidlock.h
+ * @brief System information debugging classes.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_PIDLOCK_H
+#define LL_PIDLOCK_H
+#include "llnametable.h"
+
+class LLSD;
+class LLFrameTimer;
+
+#if LL_WINDOWS //For windows platform.
+
+#include <windows.h>
+
+#define getpid GetCurrentProcessId
+
+#else //Everyone Else
+
+#include <signal.h>
+
+#endif //Everyone else.
+
+namespace LLPidLock
+{
+ void initClass(); // { (void) LLPidLockFile::instance(); }
+
+ bool requestLock( LLNameTable<void *> *name_table=NULL, bool autosave=TRUE,
+ bool force_immediate=FALSE, F32 timeout=300.0);
+ bool checkLock();
+ void releaseLock();
+ bool isClean();
+
+ //getters
+ LLNameTable<void *> * getNameTable();
+ bool getAutosave();
+ bool getClean();
+ std::string getSaveName();
+
+ //setters
+ void setClean(bool clean);
+ void setSaveName(std::string savename);
+};
+
+#endif // LL_PIDLOCK_H