Commit Graph

2 Commits

Author SHA1 Message Date
Yuxuan Shui
5bc48bd428
Fix building on musl
* Add missing linux/stddef.h includes
* Explicitly cast PAGE_SIZE to size_t. PAGE_SIZE is defined without UL
  suffix in musl
* Musl doesn't define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, so
  initialize the mutexes with pthread_once.
2020-05-05 10:29:31 +01:00
Justin Husted
ff4d082246 Change preempt_disable() etc. to use a recursive mutex.
This is part of the userspace implementation of the kernel APIs for
bcachefs-tools. The previous implementation just provided a barrier, but
this isn't sufficient to make the associated percpu implementation safe.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00