[fpc-pascal]two questions plz help
Stefan Ziegenbalg
stefan.ziegenbalg at mailbox.tu-dresden.de
Mon Jan 14 19:14:07 CET 2002
Hi,
Thomas Schatzl wrote:
> Well, not me =) Regardless of that, is there still something to do to get
> FPC MT safe and basically operational ?
I have some working MT code :-)). At the first time I had some trouble
with i/o and mem. It can be solved with bolcking routines. The exception
handling ist still a little bit sticky.
Example blocking code:
var lock_mem : boolean;
procedure getmem2(var pt:pointer; size:longint);
bein
while lock_mem do
delay(1);
lock_mem:=true;
getmem(pt,size);
lock_mem:=false;
end;
procedure freemem2(var pt:pointer; size:longint);
bein
while lock_mem do
delay(1);
lock_mem:=true;
freemem(pt,size);
lock_mem:=false;
end;
...
...
Regards,
Stefan
----------------------------------------------
mailto:stefan.ziegenbalg at mailbox.tu-dresden.de
http://www.sziegenbalg.de
http://www.simage.org
------------------------------------------------------------------
In a world without walls and fences, who needs Windows and Gates ?
More information about the fpc-pascal
mailing list