Task blocked while sending a message to a internal socket.


    Sponsored Links


  • 1. System Stuck when enabling Data Cache
    Hi, I'm working on PPC 860T Rev D4 with Tornado 2.0.2 . It was a very simple straight forward thing to enable the Instruction Cache but when I'm trying to enable the Data cache my system get stuck. Any ideas ?
  • 2. [VxW] VME AND FPGA doubt.
    Hi All, Please clear me one doubt .. I am doing doing vme project .. The project specification says that when we boot our target the target system sends a message to FPGA and the FPGA will send address of the cards which we have to use in sysBusToLocalAdrs and should proceed. Now my doubt here is how to send message to FPGA . I am new to FPGA will it have any address so that i can use that address in sysBusToLocalAdrs function followed by vxMemProbe() call to read the address which it sends. ANY HINTS WILL BE BE GRATEFUL FOR ME.. eagerly awaiting for somebody to help regarding this. sri
  • 3. [VxW] starter
    Hi can anyone please tell me is there any way I can get the documentation for vxworks.I'm new to this and I dont know where i can get the basic help to start learning the software. regards, kumar. --------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
  • 4. [VxW] [OT!!!!]Syncronous
    Sudhir kumar wrote: > Hi everybody, > > Pls let me know whether there is BAUD RATE when dealing with syncronous communication. > > bye, > sudhir. There is certainly a transmission rate. Whether you call it a "Baud rate" depends on how much of a purist you are. The term is usually defined to mean "the symbol rate on a communications medium". Thus, modems in the voiceband network that transmit effectively 40K or so bits per second cannot be said to work over the telephone network at that rate, since the bandwidth is not that high. The baud rate at the modem to computer interface, assuming it is serial, could be 40K or so. In the days of old, when the only modems around were issued by the telephone company, one common model transmitted 2400 bits per second over a serial interfae to a computer, but 1200 baud over the network. Some folks called it 2400 baud, some called it 1200. In any case, the thing was definitely synchronous, so in general the answer is yes, but use the term with care. BTW, this is really off-topic here. Speaking only for myself, Joe Durusau

Task blocked while sending a message to a internal socket.

Postby naresh.ganapathineedi » Thu, 17 May 2007 00:32:03 GMT


  I have a query related to sockets.
  I have created a socket between the tasks (T1 & T2) running on the
same board and my creation code from T1 is follows.

mbxSock = socket(AF_INET, SOCK_STREAM,0)
int reuse = 1;
    setsockopt(mbxSock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse,
int flag = 1;
    setsockopt(mbxSock, IPPROTO_TCP, TCP_NODELAY, (char *) &flag,
int bufferSize = 16384;

  My task T2 listens to this internal socket from T1 and some other
external sockets also from different boards(using select call). When
my application is runnning, Task T1 is pending on a semaphore when it
was trying to send a message to this socket. Here is the callstack of
task T1

0x00ccfb4c -> send + 0x4c
0x00c7b008 -> bsdSend + 0xd0
0x00ce2b58 -> sosend + 0x2a4
0x00c77db4 -> sbwait + 0x2c
0x00c78b70 -> ksleep + 0x68
0x00cb8904 -> semTake + 0x140
0x00cb7d7c -> semBTake + 0x190

   I thought other task T2 is not reading the messages from the socket
and that is the reason task T1 is not able to send message and
waiting. But if I observe the task T2 call stack, the last call is a
select call (Does it mean no messages are available in any of it's
sockets (internal + external)).

   Can some body please tell me what is happening in the above
callstack and why task T1 is waiting for a semaphore and when the
above sequence of calls can come.


Re: Task blocked while sending a message to a internal socket.

Postby naresh.ganapathineedi » Thu, 24 May 2007 20:29:42 GMT

To add to the my above question.

            I have read some discussions in the forum and came to know
that the send can block if it doesnot a sufficient mbufs to put the
message as i did not set the non blocking option from sending side.

            Ok, i agree to this. That means this socket has data to
read. I have verifed the callstack of receiver to check why it is not
reading. Strange thing is the last call in the stack is semTask inside
the select function call but my task is not pending. Here is the

0x00c90c64 -> select + 0x308
0x00cb8904 -> semTake + 0x140
0x00cb7d7c -> semBTake + 0x190

             Can some body help me why select has not returned even
though my socket has the data to read.
             One more doubt is, callstack shows the last call is
semBTake but my task state is not pending. How this can happen.


Return to VxWorks


Who is online

Users browsing this forum: No registered users and 60 guest