void pmemlog_walk(PMEMlogpool *plp, size_t chunksize, int(*process_chunk)(const void buf, size_t len, void *arg ), void *arg);
The process_chunk() function takes specified arguments namely, buf, len and arg. I don't understand what is the use of the argument arg and if this can be used in anyway setting the required fields.
I am also curious about how to check if the log is nearly full, close it and unlink for implementing the ping-pong solution.
Best Regards,
Supriya
How can I use the callback function "process_chunk()" to read the buf and setting the values of some fields required in my application. Here is the syntax of pmemlog_walk() API:void pmemlog_walk(PMEMlogpool *plp, size_t chunksize, int(*process_chunk)(const void buf, size_t len, void *arg ), void *arg);
The process_chunk() function takes specified arguments namely, buf, len and arg. I don't understand what is the use of the argument arg and if this can be used in anyway setting the required fields.
I am also curious about how to check if the log is nearly full, close it and unlink for implementing the ping-pong solution.