comparison src/c/driver.c @ 324:b91480c9a729

More opportunities to use regions and lack of string copying
author Adam Chlipala <adamc@hcoop.net>
date Thu, 11 Sep 2008 13:06:51 -0400
parents 9ad92047a499
children e756d3a47726
comparison
equal deleted inserted replaced
323:5030e909fbf3 324:b91480c9a729
50 static pthread_cond_t queue_cond = PTHREAD_COND_INITIALIZER; 50 static pthread_cond_t queue_cond = PTHREAD_COND_INITIALIZER;
51 51
52 #define MAX_RETRIES 5 52 #define MAX_RETRIES 5
53 53
54 static void *worker(void *data) { 54 static void *worker(void *data) {
55 int me = *(int *)data, retries_left = MAX_RETRIES;; 55 int me = *(int *)data, retries_left = MAX_RETRIES;
56 uw_context ctx = uw_init(1024, 1024); 56 uw_context ctx = uw_init(1024, 0);
57 57
58 while (1) { 58 while (1) {
59 failure_kind fk = uw_begin_init(ctx); 59 failure_kind fk = uw_begin_init(ctx);
60 60
61 if (fk == SUCCESS) { 61 if (fk == SUCCESS) {
222 } 222 }
223 223
224 uw_send(ctx, sock); 224 uw_send(ctx, sock);
225 225
226 printf("Done with client.\n\n"); 226 printf("Done with client.\n\n");
227 uw_memstats(ctx);
227 break; 228 break;
228 } 229 }
229 } 230 }
230 231
231 close(sock); 232 close(sock);