From f5baaf48e3e82b1caf9f5cd1207d4d6feba3a2e5 Mon Sep 17 00:00:00 2001 From: Thomas Bertschinger Date: Mon, 15 Jan 2024 23:41:02 -0700 Subject: move Rust sources to top level, C sources into c_src This moves the Rust sources out of rust_src/ and into the top level. Running the bcachefs executable out of the development tree is now: $ ./target/release/bcachefs command or $ cargo run --profile release -- command instead of "./bcachefs command". Building and installing is still: $ make && make install Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet --- include/linux/rwsem.h | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 include/linux/rwsem.h (limited to 'include/linux/rwsem.h') diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h deleted file mode 100644 index f851d6a2..00000000 --- a/include/linux/rwsem.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __TOOLS_LINUX_RWSEM_H -#define __TOOLS_LINUX_RWSEM_H - -#include - -struct rw_semaphore { - pthread_rwlock_t lock; -}; - -#define __RWSEM_INITIALIZER(name) \ - { .lock = PTHREAD_RWLOCK_INITIALIZER } - -#define DECLARE_RWSEM(name) \ - struct rw_semaphore name = __RWSEM_INITIALIZER(name) - -static inline void init_rwsem(struct rw_semaphore *lock) -{ - pthread_rwlock_init(&lock->lock, NULL); -} - -#define down_read(l) pthread_rwlock_rdlock(&(l)->lock) -#define down_read_killable(l) (pthread_rwlock_rdlock(&(l)->lock), 0) -#define down_read_trylock(l) (!pthread_rwlock_tryrdlock(&(l)->lock)) -#define up_read(l) pthread_rwlock_unlock(&(l)->lock) - -#define down_write(l) pthread_rwlock_wrlock(&(l)->lock) -#define up_write(l) pthread_rwlock_unlock(&(l)->lock) - -#endif /* __TOOLS_LINUX_RWSEM_H */ -- cgit v1.2.3