63 for (
i = 0;
i <
NR; ++
i) {
128 for (
i = 0;
i <
NR; ++
i) {
145 for (
i = 0;
i <
NR; ++
i) {
152 for (
i = 0;
i <
NR; ++
i)
155 for (
i = 0;
i <
NR; ++
i) {
168 for (
i = 0;
i <
NR / 2; ++
i) {
182 for (
i = 0;
i <
NR / 2; ++
i) {
187 for (
i = 0;
i <
NR; ++
i) {
206 for (
i = 0;
i <
S; ++
i) {
212 for (
i =
S;
i <
S +
C; ++
i) {
218 for (
i =
S;
i <
S +
C; ++
i) {
225 for (
i = 0;
i <
S; ++
i) {
238 for (
i = 0;
i <
S; ++
i) {
244 for (
i =
S;
i <
S +
C; ++
i) {
250 for (
i =
S;
i <
S +
C; ++
i) {
257 for (
i = 0;
i <
S; ++
i) {
static void test_rw_writers(void)
static struct m0_semaphore q
int m0_thread_join(struct m0_thread *q)
static void wstarver(int x)
static void test_rw_rstarve(void)
M0_INTERNAL void m0_rwlock_write_lock(struct m0_rwlock *lock)
static struct m0_thread t[NR]
static struct m0_semaphore p
static void test_rw_excl(void)
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
static struct m0_rwlock m
static void rstarver(int x)
M0_INTERNAL void m0_rwlock_init(struct m0_rwlock *lock)
static void reader(int n)
static void rcheck(int x)
void m0_thread_fini(struct m0_thread *q)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
M0_INTERNAL void m0_rwlock_write_unlock(struct m0_rwlock *lock)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_rwlock_read_lock(struct m0_rwlock *lock)
static void writer(int n)
static void test_rw_readers(void)
M0_INTERNAL void m0_rwlock_fini(struct m0_rwlock *lock)
M0_INTERNAL void m0_rwlock_read_unlock(struct m0_rwlock *lock)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static void wcheck(int x)
static void test_rw_wstarve(void)