comp.lang.ada
 help / color / mirror / Atom feed
* HELP: Ada an socket system calls
@ 1991-03-23  8:31 spinrad
  0 siblings, 0 replies; only message in thread
From: spinrad @ 1991-03-23  8:31 UTC (permalink / raw)


Hello Ada Wizards,

I'm new to ada and to sockets so if this problem has already
been dealt with, I apologize.

I'm tryinng to implement an ada program which runs concurrently on 2 
(or more) sun 3/60s.  I've set up unix stream sockets to communicate 
between the programs running on different computers, and for single 
task ada programs, I got the sockets working perfectly.  

To implement the socket system calls, I used 'C' routines which 
I linked to ada via the INTERFACE pragmas.  As I mentioned earlier, 
I got this part working fine for single task ada programs.  But when
I try to use additional ada tasks, my SEND and RECV socket system calls
occasionally return with errno =

	EINTR - Interrupted system call

In my simple test program which runs into this error I have two tasks: 
1 task continually makes c interface calls which results in a SEND system
call; the other task is in an infinite loop adding and subtracting 
a fixed amount to a variable.

My guess that the EINTR is caused by a signal from the os used by ada to
implement task switching.  And I'm guessing that this signal occasionally 
arrives while one of the tasks in a socket system call.  

Has anybody seen something like this before, or am I in newly unexplored
territory?  If someone has seen this error in ada before, can you tell
me if my guesses are correct, and how did you get around this problem?

Any suggestions or insights would be grately appreciated.  If possible
I would perfer replies be sent by email instead of posted to the newsgroup.
If there is a large interest I'll post a summary.

And one final note, I'm using the VERDIX ada compiler on sun 3/60s.

Many Thanks!!!

Sandy
--
			    Sandy Spinrad
		   Internet: spinrad@cornu.ucsb.edu
 		 UUNET: uunet!hub.ucsb.edu!spinrad@cornu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1991-03-23  8:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-03-23  8:31 HELP: Ada an socket system calls spinrad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox