MCPcopy Create free account
hub / github.com/acl-dev/acl / acl_yqueue_new

Function acl_yqueue_new

lib_acl/src/stdlib/common/acl_yqueue.c:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33ACL_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}
51static void chunk_data_free(chunk_t *chunk, int begin, int end,
52 void(*free_fn)(void*))
53{

Callers 1

acl_ypipe_newFunction · 0.85

Calls 2

acl_atomic_newFunction · 0.85
acl_atomic_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…