in reply to integrating Perl into a C program... that uses threads
See Extending and Embedding Perl and Extending and Embedding Perl (and also the publisher's site) if insist on embedding Perl after all.