[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Mystisk pthread_cond_wait fejl (muligvis en bug)



Anders Gnistrup wrote:
Hej Morten

Det er pracis det jeg oplever. Det er rart at vide at det er et kendt problem samt at POSIX ikke helt følger standarden men at der er mulighed for at tvinge den til det. Din løsning med at behandle samtlige date duer desværre ikke. Årsagen er at condition og mutex beskytter et lagerområde og dette område må IKKE overskrives før hovedløkken har behandlet data. For hvert signal er der nye data.

Jeg er ikke helt med på hvad du mener, problem. Posix (threads) er en standard, så den må jo siges at følge standarden :) Linux implementeringen af Poxis threads har, ihvertfald før NTPL ikke fulgt Posix helt, men forskellen er SVJH kun i håndtering af Unix signaler, om de bliver sendt til en enkelt eller alle tråde.


Den semantik du har brug for er ikke garanteret af en condition variabel. Ja, mutex'en låst når du kommer tilbage fra dit vent, men der er ikke nogen garanti for at mutex'en er fair, og derfor kan din load_func sagtens have nået at låse den i og op mange gange inden din hovedtråd får lov til at køre.

Mvh Morten

 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *