MCPcopy Index your code
hub / github.com/F-Stack/f-stack / stklist_init

Function stklist_init

lib/ff_memory.c:108–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106static inline int stklist_push(StackList_t * p, uint64_t val);
107
108static int stklist_init(StackList_t*p, int size)
109{
110
111 int i = 0;
112
113 if (p==NULL || size<=0){
114 return -1;
115 }
116 p->size = size;
117 p->top = 0;
118 if ( posix_memalign((void**)&p->ele, sizeof(uint64_t), sizeof(uint64_t)*size) != 0)
119 return -2;
120
121 return 0;
122}
123
124static inline void *stklist_pop(StackList_t *p)
125{

Callers 1

ff_mmap_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected