2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

add write quota

This commit is contained in:
Bob Halley
1998-11-12 22:27:30 +00:00
parent c8e7460242
commit 994ba9c913
3 changed files with 27 additions and 8 deletions

View File

@@ -79,14 +79,14 @@ main(int argc, char *argv[]) {
nworkers = 24;
printf("%d workers\n", nworkers);
INSIST(isc_rwlock_init(&lock) == ISC_R_SUCCESS);
INSIST(isc_rwlock_init(&lock, 5, 10) == ISC_R_SUCCESS);
for (i = 0; i < nworkers; i++) {
sprintf(name, "%02u", i);
dupname = strdup(name);
INSIST(dupname != NULL);
if (i != 0 && i % 3 == 0)
INSIST(isc_thread_create(run2, dupname, &workers[i]) ==
INSIST(isc_thread_create(run1, dupname, &workers[i]) ==
ISC_R_SUCCESS);
else
INSIST(isc_thread_create(run1, dupname, &workers[i]) ==