Re: [fpc-pascal] GetThreadId, GetCurrentThreadId and MainThreadId
Vincent Snijders schreef: Hi, While investigating http://bugs.freepascal.org/view.php?id=14335 I ran into the following peculiarities. Please, comment and tell for which item you want bug reports, if any. I tested on i386-linux. I guess I need to submit three bug reports to get an answer. :-) Vincent ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] GetThreadId, GetCurrentThreadId and MainThreadId
JoshyFun schreef: Hello FPC-Pascal, Tuesday, September 8, 2009, 2:02:46 PM, you wrote: VS> If cthreads is used, I get the following output: VS> GetThreadID=3084795456 VS> GetCurrentThreadID=3085236992 VS> MainThreadID=3085236992 VS> 4. What is the difference between GetThreadID and VS> GetCurrentThreadID? This code runs VS> in the same thread, so I expect the same value. Hmmm... It looks to me as GetThreadID return the current thread handle instead the ID. In Windows both are different things but I do not know in other OS. I am not convinced, on windows they are the same, on i386-linux they are different. Vincent ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] GetThreadId, GetCurrentThreadId and MainThreadId
Hello FPC-Pascal, Tuesday, September 8, 2009, 2:02:46 PM, you wrote: VS> If cthreads is used, I get the following output: VS> GetThreadID=3084795456 VS> GetCurrentThreadID=3085236992 VS> MainThreadID=3085236992 VS> 4. What is the difference between GetThreadID and VS> GetCurrentThreadID? This code runs VS> in the same thread, so I expect the same value. Hmmm... It looks to me as GetThreadID return the current thread handle instead the ID. In Windows both are different things but I do not know in other OS. Anyway the name is badly choosen as it conflicts with Windows GetThreadID(ThreadHandle) function. -- Best regards, JoshyFun ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal