My Perl XS program calls one of the function in shared library(.so file).This function in shared library creates new thread internally. The new thread calls the extern callback function whose defination i have provided in Perl XS program. Now, when in this callback function, i call dSP macro,i gets segmentation fault at dSP. Can someone help?