Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\misc\kill.cpp
20 _LIT(KPanicCat,"Test");
22 LOCAL_D RTest test(_L("Kill"));
24 GLDEF_C TInt E32Main()
29 User::CommandLine(cmd);
31 TPtrC threadSpec(lex.NextToken());
32 TFindThread ft(threadSpec);
33 TExitType exitType=EExitKill;
37 TPtrC xtSpec(lex.NextToken());
44 exitType=EExitTerminate;
45 else if (xt0==TChar('p'))
47 new(&xc) TPtrC(lex.NextToken());
55 while (ft.Next(fn)==KErrNone)
57 test.Printf(_L("Killing %S\n"),&fn);
62 // FIXME: SHOULD REMOVE CRITICALNESS - WOULD NEED DEVICE DRIVER
65 case EExitKill: t.Kill(exitCode); break;
66 case EExitTerminate: t.Terminate(exitCode); break;
67 case EExitPanic: t.Panic(KPanicCat,exitCode); break;