[fpc-pascal] Please Help - Need ONE HINT - Trying to get something like sched_yield with free pascal in linux
Hi all – and thanks to who ever can respond in advance. I have a Server Like App – I need the equivalent of sched_yield I looked in oldlinux unit, and tried the syscallregs , I tried to use the time structure with it and the syscall_nr_sched_yield (=158) parameter. The problem is – in my main process’s loop – it never givers up the CPU – now the really sad thing is in win32 I’m getting much better response using the sleep system call – just a few milliseconds is all I need, just to allow other things the OS and other spawned threads might want to get done also. I was thinking there might be something to signals – but I don’t understand them yet. Any suggestions would be greatly appreciated. Jason P Sage ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] fpdoc's generated inheritance output is incorrect
Hi, I thought the order in which I specify the input files are not important, but clearly it seems to be. This can be seen in the inheritance part of the html output. Is this a bug in fpdoc? Below is the Inheritance hierarchy part show of the TtiObject class with the input files in a random order. The hierarchy is wrong and classes are missing. TtiObject Base class for single objects | TtiVisited ? TObject - Below is the hierarchy created, after I reordered the input files sent to fpdoc. Now the hierarchy is correct. TtiObject Base class for single objects | TtiVisited | TtiBaseObject | TObject - Regards, - Graeme - -- There's no place like 127.0.0.1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] multidimensional dynarrays SetLenght and memory layout
Hi, since I managed to get static arrays handed over to a C library I want to know if this is possible for dynamic arrays too. I browsed the docs and source but I'm not able to find the actual implementation of the SetLength() procedure for dynarrays. Where is it or maybe better: how does it work? I think I'll know when the first question is answered, but: how is the memory for dynamic arrays handled, is there a chance of forcing it to be one continuous block on the heap for giving a pointer to it to an external function? TIA, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Linux-Sparc Port of FPC 2.0.4
"Wolfe, Robert" wrote: > > Good afternoon all! Just signed up for the list to let everyone know > that I have built version 2.0.4 of FPC for the Sparc-Linux platform. If > anyone would be interested in getting their hands on this, please let me > know. Well done that man :-) Were you able to get the debugger working with the fp IDE? That's where I ground to a halt when I was working on this in the first half of August- since then I've had to spend time on other things. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Please Help - Need ONE HINT - Trying to get something like sched_yield with free pascal in linux
Jason Sage wrote: > Hi all – and thanks to who ever can respond in advance. > > > > I have a Server Like App – I need the equivalent of sched_yield Tried sleep(0); yet ? Micha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Updating to 2.0.4 bugreport
Hello, the update on 2.0.4 shows some bugs: var dirstr:string getdir(0,dirstr); // <- not works (on linux), the result is a string with length 0 The Compiler switch "Use register-variables" (switch off state) seems not to work. There is an error with involved asm code. If at the "end;" statement at asm routines the registers are named then the program works correct. In version 2.0.2 it worked without naming the registers. Textmode IDE: at the end of a linux program the textmode ide is in trouble. Rainer ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Updating to 2.0.4 bugreport (2)
var dirstr:string getdir(0,dirstr); // <- not works (on linux) dstr is something like'/ ' Rainer ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Updating to 2.0.4 bugreport (3)
var dirstr:string getdir(0,dirstr); sorry it works, the error has also to do with the other described problem Rainer ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] FPC Compiler Internal Error: 200410231 (To Whom it may Concern)
u01g_jcore.pp(14304,3) Fatal: Internal error 200410231 u01g_jcore.pp(14304,3) Fatal: Compilation aborted The following Construct caused an Error I haven't seen before but the workaround was simple enough so I'm just writing this for the record. Offending construct: AnsiString(JFC_DL(CPL.lpItem).Item_lpPTR):=p_sa; //This version generates FPC Compiler Error-Internal: 200410231 Workaround: AnsiString(JFC_DLITEM(JFC_DL(CPL.lpItem).lpItem).lpPTR):=p_sa; To Summarize - I think type casting across properties may in some cases be a bit much for the compiler. I could be way off, all I know is that by eliminating the properties "part" by accessing the fields directly via typecasting and dereferenced pointers all is well in the world. JFC_DLITEM is a CLASS that is nothing more than an element in a homemade "double-linked-list" class named JFC_DL. Item_lpPTR is a Property of JFC_DL and is of type pointer. It basically sets the CURRENT "ITEM"'s field in JFC_DLITEM, or lets you read it. Here is JFC_DLITEM - //== === Type JFC_DLITEM = Class //protected Public lpPrev: pointer;// private lpNext: pointer;// private // public lpPtr: pointer; // Most Basic Field saClassName: AnsiString; Constructor create; // OVERRIDE - INHERIT - Initializes pointers as NIL // nil. End; //== === - Here is the Definition of the JFC_DL.Item_lpPTR Property (Which sets and returns the lpPTR field in JFC_DLITEM) - {start class declaration snippet} //-- - // make properties work //-- - Function read_item_lpPtr: pointer; Procedure write_item_lpptr(p_lp:pointer); //-- - Property Item_lpPtr: pointer read read_item_lpPtr Write write_item_lpptr; {end class declaration snippet} //== === Function JFC_DL.read_item_lpPtr: pointer; //== === Begin Result:=JFC_DLITEM(lpItem).lpPtr; End; //== === //== === Procedure JFC_DL.write_item_lpptr(p_lp:pointer); //== === Begin JFC_DLITEM(lpItem).lpPtr:=p_lp; End; //== === Have a great Day. Jason P Sage ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal