| 31 | }; |
| 32 | |
| 33 | ACL_YQUEUE *acl_yqueue_new(void) |
| 34 | { |
| 35 | ACL_YQUEUE *self; |
| 36 | |
| 37 | self = (ACL_YQUEUE *) acl_mymalloc(sizeof(ACL_YQUEUE)); |
| 38 | memset(self, 0, sizeof(ACL_YQUEUE)); |
| 39 | self->begin_chunk = (chunk_t *) acl_mymalloc(sizeof(chunk_t)); |
| 40 | memset(self->begin_chunk, 0, sizeof(chunk_t)); |
| 41 | self->begin_pos = 0; |
| 42 | self->back_chunk = NULL; |
| 43 | self->back_pos = 0; |
| 44 | self->end_chunk = self->begin_chunk; |
| 45 | self->end_pos = 0; |
| 46 | self->spare_chunk = acl_atomic_new(); |
| 47 | acl_atomic_set(self->spare_chunk, NULL); |
| 48 | |
| 49 | return self; |
| 50 | } |
| 51 | static void chunk_data_free(chunk_t *chunk, int begin, int end, |
| 52 | void(*free_fn)(void*)) |
| 53 | { |
no test coverage detected
searching dependent graphs…