thread argument problem

I

is_vlb50

I have problem with pass structure to thread function in SOLARIS.When I

pass it to created thread it always has empty values.

my structure defined as:
typedef struct momMSG{
struct mbhdr hd;
struct SCRIPTMSG MOMBuf;



}MY_SCRIPTMSG;


In my main function:

MY_SCRIPTMSG rcvVLMOMbuf;
--- fill rcvVLMOMbuf with values
if((rv = thr_create(NULL,0,ServerThread,(void *)
&rcvVLMOMbuf,THR_DETACHED, &tid)) == 0)


And in thread function:
void* ServerThread(void *arg)
{
MY_SCRIPTMSG* preceivedMSG = (MY_SCRIPTMSG*) arg;


}


The pointer preceivedMSG point on empty values.
What is the reason thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top