diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:35 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:35 -0800 |
commit | f721e3ac031f892af46f255a47d7f54a91317b30 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /android/utils/filelock.h | |
parent | bae1bc39312d5019bd9a5b8d840a529213a69a17 (diff) | |
download | external_qemu-f721e3ac031f892af46f255a47d7f54a91317b30.zip external_qemu-f721e3ac031f892af46f255a47d7f54a91317b30.tar.gz external_qemu-f721e3ac031f892af46f255a47d7f54a91317b30.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'android/utils/filelock.h')
-rw-r--r-- | android/utils/filelock.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/android/utils/filelock.h b/android/utils/filelock.h deleted file mode 100644 index 9bc86b5..0000000 --- a/android/utils/filelock.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2007-2008 The Android Open Source Project -** -** This software is licensed under the terms of the GNU General Public -** License version 2, as published by the Free Software Foundation, and -** may be copied, distributed, and modified under those terms. -** -** 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 -** GNU General Public License for more details. -*/ - -#ifndef _ANDROID_UTILS_FILELOCK_H -#define _ANDROID_UTILS_FILELOCK_H - -/** FILE LOCKS SUPPORT - ** - ** a FileLock is useful to prevent several emulator instances from using the same - ** writable file (e.g. the userdata.img disk images). - ** - ** create a FileLock object with filelock_create(), the function will return - ** NULL only if the corresponding path is already locked by another emulator - ** of if the path is read-only. - ** - ** note that 'path' can designate a non-existing path and that the lock creation - ** function can detect stale file locks that can longer when the emulator - ** crashes unexpectedly, and will happily clean them for you. - ** - ** you can call filelock_release() to release a file lock explicitely. otherwise - ** all file locks are automatically released when the program exits. - **/ - -typedef struct FileLock FileLock; - -extern FileLock* filelock_create ( const char* path ); -extern void filelock_release( FileLock* lock ); - -#endif /* _ANDROID_UTILS_FILELOCK_H */ |