discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test cases: dining philosophers, race condition and deadlock?


From: Fred Kiefer
Subject: Re: Test cases: dining philosophers, race condition and deadlock?
Date: Fri, 06 Oct 2006 21:01:48 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060911)

No deadlock here and I never heard of one before. There is a GNUmakefile
in the directory already, why don't you use this and perhaps you should
also read the README file, that might answer your other question.

Cheers
Fred

Nikolaus Waxweiler schrieb:
> Hi all,
> can somebody confirm that the dining philosophers at
> http://svn.gna.org/viewcvs/*checkout*/gnustep/libs/base/trunk/Testing/diningPhilosophers.m?rev=22472
> deadlock after some time?
> 
> I use gnustep-base-1.13.0 on FreeBSD 6.1, GCC 3.4.4 and compiled the
> file with the following GNUmakefile:
> 
> -------------------------------------
> include $(GNUSTEP_MAKEFILES)/common.make
> 
> #
> # Tool
> #
> VERSION = 0.1
> PACKAGE_NAME = ToolTest
> TOOL_NAME = ToolTest
> ToolTest_TOOL_ICON =
> GNUSTEP_INSTALLATION_DIR = $(HOME)/GNUstep/Tools
> 
> #
> # Libraries
> #
> ToolTest_TOOL_LIBS +=
> 
> #
> # Class files
> #
> ToolTest_OBJC_FILES = \
> diningPhilosophers.m
> 
> -include GNUmakefile.preamble
> include $(GNUSTEP_MAKEFILES)/aggregate.make
> include $(GNUSTEP_MAKEFILES)/tool.make
> -include GNUmakefile.postamble
> ------------------------------------
> 
> It doesn't always deadlock immediately, I got the following after some
> waiting:
> 
> -----------
> Philosopher 3 is eating.
> Philosopher 3 is eating.
> Philosopher 3 is eating.
> Philosopher 3 is eating.
> Philosopher 3 is eating.
> Philosopher 3 is eating.
> Philosopher 0 can start eating.
> Philosopher 0 is eating.
> <long pause..>
> Philosopher 3 is eating.
> <another long pause...>
> ^C
> ------------
> 
> By the way, what use is a test that doesn't end :O? Oh, and: the other
> testfiles (e.g. the one for arrays) look like they need a real unit
> testing library. Or is there some "Error:" grepping involved?
> 
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnustep
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]