MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bioCreateLazyFreeJob

Function bioCreateLazyFreeJob

app/redis-6.2.6/src/bio.c:138–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void bioCreateLazyFreeJob(lazy_free_fn free_fn, int arg_count, ...) {
139 va_list valist;
140 /* Allocate memory for the job structure and all required
141 * arguments */
142 struct bio_job *job = zmalloc(sizeof(*job) + sizeof(void *) * (arg_count));
143 job->free_fn = free_fn;
144
145 va_start(valist, arg_count);
146 for (int i = 0; i < arg_count; i++) {
147 job->free_args[i] = va_arg(valist, void *);
148 }
149 va_end(valist);
150 bioSubmitJob(BIO_LAZY_FREE, job);
151}
152
153void bioCreateCloseJob(int fd) {
154 struct bio_job *job = zmalloc(sizeof(*job));

Callers 6

dbAsyncDeleteFunction · 0.85
freeObjAsyncFunction · 0.85
emptyDbAsyncFunction · 0.85
freeSlotsToKeysMapAsyncFunction · 0.85
freeLuaScriptsAsyncFunction · 0.85

Calls 2

zmallocFunction · 0.85
bioSubmitJobFunction · 0.85

Tested by

no test coverage detected