Mariusz W Stanisz wrote:
> 
> Hi
>   I have a problem does anyone know how i can use thread on the same
> data ,like link list or a bin tree. Any examples would be greatly
> appreciated. :P
> 
>                           ,-~~-.____.   Snoopy Express
>                          /  ()=(()   \
>                         (    (        O
>      Try my icq          \._\,  ,----'
>      7040202        ##XXXxxxxxxx
>                             /  ---'~;
>                            /    /~|-
>                          =(   ~~  |
>                    /~~~~~~~~~~~~~~~~~~~~~\
> 
> -

Shared datas must be locked !
Use pthread_mutex* functions for it.
You can create a more "powerful" lock (Reader/Writer lock for exemple),
with
condition variables (see pthread_condattr*).

No examples, sorry !

-- 
Pierre Vign�ras
http://dept-info.labri.u-bordeaux.fr/~vigneras/

Equipe syst�mes et objets distribu�s
http://jccf.labri.u-bordeaux.fr/jodo/

LaBRI
http://dept-info.labri.u-bordeaux.fr/
begin:vcard 
n:Vign�ras;Pierre
tel;cell:06.81.50.55.51
tel;work:05.56.84.24.87
x-mozilla-html:FALSE
url:http://dept-info.labri.u-bordeaux.fr/~vigneras/
org:LaBRI;Computer Science
version:2.1
email;internet:[EMAIL PROTECTED]
title:Student
adr;quoted-printable:;;Laboratoire Bordelais de Recherche en Informatique=0D=0AUniversit=E9 de Bordeaux I=0D=0A351, cours de la lib=E9ration;Talence;;33405;France
note;quoted-printable:<A href=3D"http://jccf.labri.u-bordeaux.fr/jodo/">=0D=0ADistributed Systems and Objects team</A>=0D=0A=0D=0A=0D=0A
x-mozilla-cpt:;-1536
fn:Pierre Vign�ras
end:vcard

Reply via email to