On Wed, 8 Nov 2006, Michael Schnell wrote:
Jonas Maebe wrote:
Does anyone see a problem with the following CSuspendThread/CResumeThread
implementations?
1) This of course is the Linux version. Are the other implementation already
in place so that the result is platform independent
On 8 nov 2006, at 10:05, Michael Schnell wrote:
Does anyone see a problem with the following CSuspendThread/
CResumeThread implementations?
1) This of course is the Linux version.
No, it's the generic *nix version (i.e., also used for Free/Net/
OpenBSD, Darwin and Solaris).
Are the
Jonas currently fpc2.1.1 doesn't compile on 2.1.1 with:
rtl/units/i386-freebsd -di386 -dRELEASE ../unix/cthreads.pp
cthreads.pp(252,42) Error: Incompatible type for arg no. 1: Got
LongInt, expected Pointer
Note:
unixtypes thread_t = pointer
pthreads.inc thread_t (BSD and linux) = cInt {linux is
On Wed, 8 Nov 2006, Ales Katona wrote:
Jonas currently fpc2.1.1 doesn't compile on 2.1.1 with:
rtl/units/i386-freebsd -di386 -dRELEASE ../unix/cthreads.pp
cthreads.pp(252,42) Error: Incompatible type for arg no. 1: Got
LongInt, expected Pointer
Note:
unixtypes thread_t = pointer
Note:
unixtypes thread_t = pointer
Wrong, same as in ptypes.inc
pthreads.inc thread_t (BSD and linux) = cInt {linux is Longint but
that's just bug)
freebsd/pthreads.inc doesn't define thread_t, neither does the linux
version?
There is a small issue with tthreadid which is already used to
On 8 nov 2006, at 10:42, Ales Katona wrote:
Jonas currently fpc2.1.1 doesn't compile on 2.1.1 with:
rtl/units/i386-freebsd -di386 -dRELEASE ../unix/cthreads.pp
cthreads.pp(252,42) Error: Incompatible type for arg no. 1: Got
LongInt, expected Pointer
So either TThreadID or pthread_t is
A cleaner naming of problematic parts:
1. TThreadID is defined stand-alone not as a pthread_t, should be fixed.
2. TThreadHandler (the callback for resume, suspend) has result as DWord
while posix stuff (pthread_kill etc.) usualy return cInt
3. in linux I saw pthreads functions return longint, I
On 8 nov 2006, at 11:16, Ales Katona wrote:
A cleaner naming of problematic parts:
1. TThreadID is defined stand-alone not as a pthread_t, should be
fixed.
2. TThreadHandler (the callback for resume, suspend) has result as
DWord
while posix stuff (pthread_kill etc.) usualy return cInt
3.
On Wed, 8 Nov 2006, Ales Katona wrote:
A cleaner naming of problematic parts:
1. TThreadID is defined stand-alone not as a pthread_t, should be fixed.
2. TThreadHandler (the callback for resume, suspend) has result as DWord
while posix stuff (pthread_kill etc.) usualy return cInt
Just
On 8 nov 2006, at 11:21, Jonas Maebe wrote:
Question about #2. Well.. this is a tough nut? I suspect it's
because of
various threading backends, but we need to handle those -1
properly if
nothing else but this implies going over by all used pthread
functions
and seeing all possible
Just define an opaque type TThreadResult:
TThreadResult = DWord // Windows
TThreadResult = cInt // Unices
I don't like this solution for several reasons:
1. What if one OS has more backends for threading available, which
differ in this?
2. How are we going to handle error states on
On Wed, 8 Nov 2006, Ales Katona wrote:
Just define an opaque type TThreadResult:
TThreadResult = DWord // Windows
TThreadResult = cInt // Unices
I don't like this solution for several reasons:
1. What if one OS has more backends for threading available, which
differ in this?
Hello,
Does anyone see a problem with the following CSuspendThread/
CResumeThread implementations?
function CSuspendThread (threadHandle : TThreadID) : dword;
begin
result := pthread_kill(threadHandle,SIGSTOP);
end;
function CResumeThread (threadHandle : TThreadID) :
On ut , 2006-11-07 at 18:39 +0100, Jonas Maebe wrote:
Hello,
Does anyone see a problem with the following CSuspendThread/
CResumeThread implementations?
function CSuspendThread (threadHandle : TThreadID) : dword;
begin
result := pthread_kill(threadHandle,SIGSTOP);
On Tue, 7 Nov 2006, Jonas Maebe wrote:
Hello,
Does anyone see a problem with the following CSuspendThread/CResumeThread
implementations?
function CSuspendThread (threadHandle : TThreadID) : dword;
begin
result := pthread_kill(threadHandle,SIGSTOP);
end;
function
15 matches
Mail list logo