Re: [fpc-pascal] WinCE multithreading
Patch for FPC-RTL: http://bugs.freepascal.org/view.php?id=20280 The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
Hi! I submitted two patches that solves multi threading issues on WinCE (one on Lazarus LCL, other on FPC RTL) http://bugs.freepascal.org/view.php?id=18756 After the patches, all examples works as expected. The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
Hi! I made some changes for WinCE and want test. How I rebuild only the RTL on windows? I'm using WinXP, Lazarus 0.9.30.1 with fpc 2.4.4 + cross-arm downloaded from daily snapshots. The best regards, Fabio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
Yes, I don't use this. I access the LCL methods via TThread.Synchronize, On my mind, I'm doing this right... Correct me if I'm wrong. The bug related tells that TThread.Synchronize don't work as expected in WinCE as in others OS's. It has two examples that don't work as expected on WinCE, both with threads and Critical Sections. The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
On Mon, Sep 12, 2011 at 8:08 PM, Fabio Luis Girardi wrote: > I'm porting a multi-thread project to WinCE. Everything works fine, > except when I put a Label (or any window control) on any form and link > it with the data coming from any thread. My question is: What's the > current state of the WinCE port with threads? You cannot use the LCL from other threads ... use LCLIntf.SendMessage instead and handle the message in a procedure in your window. I just commited some more explanations about SendMessage in the docs. Read here: http://lazarus.svn.sourceforge.net/viewvc/lazarus/trunk/docs/xml/lcl/lclintf.xml?r1=32351&r2=32350&pathrev=32351 -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
Yes, the current FPC has this feature. Maybe the problem with WinCE with multithreading is this: http://bugs.freepascal.org/view.php?id=18756 and not the use or not of Unaligned keyword. Added with some outdated documentation on Wiki, this cause a little of confusion in the mind of who starts with WinCE with a multi-thread application. I changed the issue. Testing now to see how it works. The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
But is the unaligned still required? I remember that unaligned access was sure crash in WinCE many years ago, but I vaguely remember someone mentioned that FPC had improved it's support for the compiler figuring out on it's own when something is unaligned. While doing Android development for example, I haven't yet had a single crash due to unaligned access ... and I made no use of this keyword so far. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
On 14 Sep 2011, at 19:16, Fabio Luis Girardi wrote: > I'm debugging and I have doubt: I'm using records and pointers to > records. On WinCE wiki, the use of unaligned only shows with pointers > to integer. And with recods, I must do > > unalinged(myrec^).member > > or > > unalinged(myrec^.member) If the pointer itself is stored at a potentially unaligned address, you need unaligned(myrec). If the record the pointer points to is stored at a potentially unaligned address, you need unaligned(myrec^.member). If both are the case, you need unaligned(unaligned(myrec)^.member) I'm fairly certain that unaligned(myrec^).member won't do anything. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
I'm debugging and I have doubt: I'm using records and pointers to records. On WinCE wiki, the use of unaligned only shows with pointers to integer. And with recods, I must do unalinged(myrec^).member or unalinged(myrec^.member) ??? The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] WinCE multithreading
On Mon, Sep 12, 2011 at 9:08 PM, Fabio Luis Girardi wrote: > Hi! > > I'm porting a multi-thread project to WinCE. Everything works fine, > except when I put a Label (or any window control) on any form and link > it with the data coming from any thread. My question is: What's the > current state of the WinCE port with threads? > > I have multi thread server on WINCE for SYNC my data from the other PC and work fine, also i have example for WebServer work on WINCE also. Some time my application hang when synchronize to log or access the gui, but i sloved it by reduce info passed to the gui, or do no pass any object that created by threads or other threads to the main thread. You can descript your problem to the FPC team when you have it. Best Regard Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal