inserting pthread_join

Dear all,

I want to insert pthread_join in a programming, the initial step is to put the statements or functions into a .c file, -emit-llvm it, then use llc to get .cpp file. I can get the information about type declaration, function declaration, so on. The question is, the name and type of pthread_join rely on the prior coding. I have no idea to deal with it. Does anyone have idea?

Any help is much appreciated.