> > > The > > static void print_item( FILE *f, const client_item *item ) > > gets already a file, please use it. > > The file is currently stdout. This should be changed to an event stream > file. Add the file pointer to client_context and open the file in main(). > > Are you suggesting to change the client_context from
typedef struct client_context { uint64_t ns_threshold; uint64_t last_ns; uint32_t last_cpu; bool flush; bool only_one_cpu; uint64_t counter; SLIST_HEAD( , client_item ) free_items; RB_HEAD( active, client_item ) active_items; } client_context; to typedef struct client_context { uint64_t ns_threshold; uint64_t last_ns; uint32_t last_cpu; bool flush; bool only_one_cpu; uint64_t counter; SLIST_HEAD( , client_item ) free_items; RB_HEAD( active, client_item ) active_items; FILE *fptr; } client_context; In this case, I have to create global client_context variable to store the file pointer in it. Is that good? -- *Ravindra Kumar Meena*, B. Tech. Computer Science and Engineering, Indian Institute of Technology (Indian School of Mines) <https://www.iitism.ac.in/>, Dhanbad
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel