locking.h revision b9447ef80bd301b932ac4d85c9622e929de5fd62
1925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason/* 2925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * Copyright (C) 2008 Oracle. All rights reserved. 3925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * 4925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * This program is free software; you can redistribute it and/or 5925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * modify it under the terms of the GNU General Public 6925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * License v2 as published by the Free Software Foundation. 7925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * 8925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * This program is distributed in the hope that it will be useful, 9925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * but WITHOUT ANY WARRANTY; without even the implied warranty of 10925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * General Public License for more details. 12925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * 13925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * You should have received a copy of the GNU General Public 14925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * License along with this program; if not, write to the 15925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason * Boston, MA 021110-1307, USA. 17925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason */ 18925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason 19925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason#ifndef __BTRFS_LOCKING_ 20925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason#define __BTRFS_LOCKING_ 21925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason 22925baeddc5b0764a53f2214a1253251bab0e0324Chris Masonint btrfs_tree_lock(struct extent_buffer *eb); 23925baeddc5b0764a53f2214a1253251bab0e0324Chris Masonint btrfs_tree_unlock(struct extent_buffer *eb); 24b4ce94de9b4d64e8ab3cf155d13653c666e22b9bChris Mason 25925baeddc5b0764a53f2214a1253251bab0e0324Chris Masonint btrfs_try_tree_lock(struct extent_buffer *eb); 26b4ce94de9b4d64e8ab3cf155d13653c666e22b9bChris Masonint btrfs_try_spin_lock(struct extent_buffer *eb); 27b4ce94de9b4d64e8ab3cf155d13653c666e22b9bChris Mason 28b4ce94de9b4d64e8ab3cf155d13653c666e22b9bChris Masonvoid btrfs_set_lock_blocking(struct extent_buffer *eb); 29b4ce94de9b4d64e8ab3cf155d13653c666e22b9bChris Masonvoid btrfs_clear_lock_blocking(struct extent_buffer *eb); 30b9447ef80bd301b932ac4d85c9622e929de5fd62Chris Masonvoid btrfs_assert_tree_locked(struct extent_buffer *eb); 31925baeddc5b0764a53f2214a1253251bab0e0324Chris Mason#endif 32