sl@0: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\misc\t_death.cpp sl@0: // sl@0: // sl@0: sl@0: #include sl@0: sl@0: GLDEF_C TInt E32Main() sl@0: { sl@0: RThread().SetPriority(EPriorityAbsoluteHigh); sl@0: RUndertaker u; sl@0: TInt r=u.Create(); sl@0: if (r!=KErrNone) sl@0: User::Panic(_L("T_DEATH 0"),r); sl@0: // RThread().SetSystem(ETrue); sl@0: FOREVER sl@0: { sl@0: TRequestStatus s; sl@0: TInt h; sl@0: u.Logon(s,h); sl@0: User::WaitForRequest(s); sl@0: RThread t; sl@0: t.SetHandle(h); sl@0: TFullName fn=t.FullName(); sl@0: TExitType exit=t.ExitType(); sl@0: TBuf<32> exitCat; sl@0: exitCat=t.ExitCategory(); sl@0: TInt exitReason=t.ExitReason(); sl@0: RDebug::Print(_L("Thread %S Exited %d,%d,%S"),&fn,exit,exitReason,&exitCat); sl@0: // if (exit==EExitPanic) sl@0: // { sl@0: // *(TInt*)0xdead0000=0; sl@0: // } sl@0: t.Close(); sl@0: } sl@0: }