[fpc-pascal] Threads

Carsten Bager carsten at beas.dk
Tue Dec 12 10:04:48 CET 2006


I have written a small program that uses threads. It works on a 386 Linux, 
but I have some problems on the Arm Linux platform. 

The program routes a TCP connection to a serial port and if the TCP is not 
in use it can route UDP packets to the serial port return answers.

The "sockets.Recv" returns an obscure value on the Arm platform (line 
462). I have created a "workaround", but sometimes I still loss data.

I only have problems in the TCP part of the program all other things works.

If I run the TCP part as a single program it works (without workarounds).

Have I done some obvious (to a thread programmer) errors writing the 
thread program, which only shows on the Arm Linux platform, or should I 
look elsewhere. On the Arm Linux platform I am using a uLibC library 
instead of the normal C library (I do not think that this is the problem but ??) 
.

I have run out of ideas.

Is there anyone that can give me a hint?

The source is included.

Carsten


-------------- next part --------------
A non-text attachment was scrubbed...
Name: udp2ser2.pas
Type: application/octet-stream
Size: 16086 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20061212/25dd9ed1/attachment.obj>


More information about the fpc-pascal mailing list