Yeah, this one work correctly. Thanks!
2007/5/8, Helmut Hartl <[EMAIL PROTECTED]>:
> > fpc 2.0.4, opensuse 10.2, glibc-2.4-31.1
You may try this version of your program
-
program Project1;
{$mode objfpc}{$H+}
uses
UnixType,pthreads;
type
TCondv = class
private
Cond : UnixType.pthre
> > fpc 2.0.4, opensuse 10.2, glibc-2.4-31.1
You may try this version of your program
-
program Project1;
{$mode objfpc}{$H+}
uses
UnixType,pthreads;
type
TCondv = class
private
Cond : UnixType.pthread_cond_t;
CAttr : UnixType.pthread_condattr_t;
public
constructor Create;
des
fpc 2.0.4, opensuse 10.2, glibc-2.4-31.1
2007/5/7, Bram Kuijvenhoven <[EMAIL PROTECTED]>:
Артем Смирнов wrote:
> I've got some troubles with pthread_cond_init when calling it in class
> members. After this action next calling of class constructor for second
> object bring to SIGSEGV. When I trie
Артем Смирнов wrote:
I've got some troubles with pthread_cond_init when calling it in class
members. After this action next calling of class constructor for second
object bring to SIGSEGV. When I tried to use Object instead Class all
seems fine, but for my task Object not approach. What it can
Can this error caused by wrong work of fpc compiler or linker?
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
No, pthread_condattr_init and pthread_cond_init initialize variables CAttr
and Cond. By the by, this code written in C work right.
2007/5/7, Leonardo M. Ramé <[EMAIL PROTECTED]>:
> {TCondv}
> constructor TCondv.Create;
> begin
> pthread_condattr_init(CAttr);
> pthread_cond_init(Cond, CAttr)
> {TCondv}
> constructor TCondv.Create;
> begin
> pthread_condattr_init(CAttr);
> pthread_cond_init(Cond, CAttr);
> end;
I never used pthreads, but looking at the constructor of TCondv, it seems to
require CAttr and
Conv to be setted before calling pthread_condattr_init and pthread_cond_init