I came across a code segment in open source, its like
does it mean that the macro pthread_exit(x) will be expanded
dbg("[%x] pthread_exit(" #x ")\n", pthread_self());\
multiple times (rather indefinite no of times) ...
& also this code internally does not call exit() system call...
I am confused how the exit is working in true sense
No, macros aren't expanded recursively, so that code will work "as you'd expect it".