rwlock.c revision c8e746024262935879c7156b2e7bde3df2f69ff5
#include <isc/assertions.h>
#include <isc/unexpect.h>
#include <stdio.h>
static void
printf("%s, %u active",
printf(", %u rwaiting, %u wwaiting\n",
}
rwl->readers_waiting = 0;
rwl->writers_waiting = 0;
if (result != ISC_R_SUCCESS) {
"isc_mutex_init() failed: %s",
return (ISC_R_UNEXPECTED);
}
if (result != ISC_R_SUCCESS) {
"isc_condition_init(readable) failed: %s",
return (ISC_R_UNEXPECTED);
}
if (result != ISC_R_SUCCESS) {
"isc_condition_init(writeable) failed: %s",
return (ISC_R_UNEXPECTED);
}
return (ISC_R_SUCCESS);
}
#ifdef DEBUG
#endif
if (type == isc_rwlocktype_read) {
if (rwl->readers_waiting != 0)
while (!done) {
if (!skip &&
} else {
rwl->readers_waiting++;
rwl->readers_waiting--;
}
}
} else {
if (rwl->writers_waiting != 0)
while (!done) {
} else {
rwl->writers_waiting++;
rwl->writers_waiting--;
}
}
}
#ifdef DEBUG
#endif
return (ISC_R_SUCCESS);
}
#ifdef DEBUG
#endif
if (rwl->writers_waiting > 0) {
} else if (rwl->readers_waiting > 0) {
}
} else {
if (rwl->readers_waiting > 0) {
} else if (rwl->writers_waiting > 0) {
}
}
} else {
rwl->writers_waiting == 0 &&
rwl->readers_waiting > 0) {
}
}
#ifdef DEBUG
#endif
return (ISC_R_SUCCESS);
}
void
rwl->readers_waiting == 0 &&
rwl->writers_waiting == 0);
}