diff options
author | durner <durner@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-09-09 21:45:40 +0000 |
---|---|---|
committer | durner <durner@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-09-09 21:45:40 +0000 |
commit | 83efca329b238573d5b007c96252d7b275f7ed3d (patch) | |
tree | 03f1f420d71a84ffac5a5a731316878ad923576b /src/include/gnunet_disk_lib.h | |
parent | 2808fbb5a61130d458c27dcfc48ba3a10c22ae5b (diff) |
locking
git-svn-id: https://gnunet.org/svn/gnunet@8972 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index 1f48d0d6aa..72a24aecb3 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h @@ -376,11 +376,23 @@ int GNUNET_DISK_directory_create (const char *dir); * @param fh file handle * @lockStart absolute position from where to lock * @lockEnd absolute position until where to lock + * @excl GNUNET_YES for an exclusive lock * @return GNUNET_OK on success, GNUNET_SYSERR on error */ int -GNUNET_DISK_file_lock(struct GNUNET_DISK_FileHandle *fh, off_t lockStart, - off_t lockEnd); +GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart, + off_t lockEnd, int excl); + +/** + * Unlock a part of a file + * @param fh file handle + * @lockStart absolute position from where to unlock + * @lockEnd absolute position until where to unlock + * @return GNUNET_OK on success, GNUNET_SYSERR on error + */ +int +GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, off_t unlockStart, + off_t unlockEnd); /** |