Lines Matching refs:accu
27 static char accu[1024] = { 0 };
28 strcat(accu, s);
29 return accu;
47 static void str_alloc_destroy_accu(void * accu);
53 char * accu; in str_accumulate() local
58 accu = (char *) pthread_getspecific(str_key); in str_accumulate()
60 if (accu == NULL) { in str_accumulate()
61 accu = (char *)malloc(1024); in str_accumulate()
62 if (accu == NULL) return NULL; in str_accumulate()
63 accu[0] = 0; in str_accumulate()
65 pthread_setspecific(str_key, (void *) accu); in str_accumulate()
66 printf("Thread %lx: allocating buffer at %p\n", pthread_self(), accu); in str_accumulate()
69 strcat(accu, s); in str_accumulate()
70 return accu; in str_accumulate()
84 static void str_alloc_destroy_accu(void * accu) in str_alloc_destroy_accu() argument
86 printf("Thread %lx: freeing buffer at %p\n", pthread_self(), accu); in str_alloc_destroy_accu()
87 free(accu); in str_alloc_destroy_accu()