[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-common-dev
Subject: [Common-dev] CR: Symbian DLL TLS usage updated for CHXSymbianServer
From: <rajesh.rathinasamy () nokia ! com>
Date: 2010-10-20 14:59:23
Message-ID: E2BCA93C601173448A14BD179A27A7FD2AF1EA730D () NOK-EUMSG-03 ! mgdnok ! nokia ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Since this is symbian only change, I will proceed with checkin if there are=
no comments by the EOD.
Modified by: rajesh.rathinasamy@nokia.com
Reviewed by: Girish Shetty
Date: 19-Oct-2010
Errorid: 417-58965 <MediaToolKit>
Project: SymbianMmf_wm
Synopsis: Symbian DLL TLS usage updated for CHXSymbianServer
DLL TLS is used in CHXSymbianServer implementation to store the log mode. D=
LL TLS can only be used for DLL and will not link against exe. So migrated =
it to UserSvr TLS. Functionality remains the same.
Also added callback functions to serverCtx to get notifications about sessi=
on death and server stop. This helps the ctx to keep track of the number of=
active sessions. OnStop notification provides an option for Ctx to cleanup=
thread specific resopurces.
Verified MDF video logging for all modes (Log disabled, console logging & F=
ile logging).
Files Modified:
common/system/platform/symbian/CHXSymbianServer.cpp
common/system/pub/platform/symbian/CHXSymbianServer.h
common/system/pub/platform/symbian/CHXSymbianServerDebug.h
New files added: None.
Image Size and Heap Use impact: no major impact
Module Release testing (STIF) : Passed.
Memory Leak Testing: Passed
Test case(s) Added : No
Platforms and Profiles Build Verified: helix-client-s60-52-mmf-mdf-dsp
Platforms and Profiles Functionality verified: armv5, winscw
Branch: 420Brizo, Head
[Attachment #5 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 \
2px solid; } --></style> </head>
<body>
<font face="Calibri, sans-serif" size="2">
<div><font color="#1F497D">Since this is symbian only change, I will proceed with \
checkin if there are no comments by the EOD.</font></div> <div><font \
color="#1F497D"> </font></div> <div>Modified by: \
rajesh.rathinasamy@nokia.com</div> <div> </div>
<div>Reviewed by: Girish Shetty</div>
<div> </div>
<div>Date: 19-Oct-2010</div>
<div> </div>
<div>Errorid: 417-58965 <MediaToolKit></div>
<div> </div>
<div>Project: SymbianMmf_wm</div>
<div> </div>
<div>Synopsis: Symbian DLL TLS usage updated for CHXSymbianServer</div>
<div> </div>
<div>DLL TLS is used in CHXSymbianServer implementation to store the log mode. DLL \
TLS can only be used for DLL and will not link against exe. So migrated it to UserSvr \
TLS. Functionality remains the same.</div> <div> </div>
<div>Also added callback functions to serverCtx to get notifications about session \
death and server stop. This helps the ctx to keep track of the number of active \
sessions. OnStop notification provides an option for Ctx to cleanup thread specific \
resopurces.</div> <div> </div>
<div>Verified MDF video logging for all modes (Log disabled, console logging & \
File logging). </div> <div> </div>
<div>Files Modified: </div>
<div>common/system/platform/symbian/CHXSymbianServer.cpp</div>
<div>common/system/pub/platform/symbian/CHXSymbianServer.h</div>
<div>common/system/pub/platform/symbian/CHXSymbianServerDebug.h</div>
<div> </div>
<div>New files added: None.</div>
<div> </div>
<div>Image Size and Heap Use impact: no major impact</div>
<div> </div>
<div>Module Release testing (STIF) : Passed.</div>
<div> </div>
<div>Memory Leak Testing: Passed</div>
<div> </div>
<div>Test case(s) Added : No</div>
<div> </div>
<div>Platforms and Profiles Build Verified: \
helix-client-s60-52-mmf-mdf-dsp</div> <div> </div>
<div>Platforms and Profiles Functionality verified: armv5, winscw</div>
<div> </div>
<div>Branch: 420Brizo, Head</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
</font>
</body>
</html>
["common_system.diff" (application/octet-stream)]
Index: platform/symbian/CHXSymbianServer.cpp
===================================================================
RCS file: /cvsroot/common/system/platform/symbian/CHXSymbianServer.cpp,v
retrieving revision 1.3.4.1
diff -w -u -b -r1.3.4.1 CHXSymbianServer.cpp
--- platform/symbian/CHXSymbianServer.cpp 26 Feb 2010 21:14:42 -0000 1.3.4.1
+++ platform/symbian/CHXSymbianServer.cpp 19 Oct 2010 22:32:51 -0000
@@ -65,6 +65,7 @@
#include <e32math.h>
#include <e32capability.h>
#include <ecom/ecom.h>
+#include <e32svr.h>
#include "hlxclib/stdlib.h"
@@ -210,7 +211,7 @@
CHXSymbianServerCtx* pServerCtx = (CHXSymbianServerCtx*)obj;
- Dll::SetTls(&(pServerCtx->m_lLogMode));
+ UserSvr::DllSetTls(HLX_SYM_SVR_TLS_LOG_MODE_INDEX, &(pServerCtx->m_lLogMode));
SERVER_LOG( (_L("CHXSymbianServerCtx[%x]::ThreadEntry Arg:%x"), obj, obj) );
@@ -238,7 +239,7 @@
SERVER_LOG( (_L("CHXSymbianServerCtx[%x]::ThreadEntry ERROR KErrNoMemory"), obj) );
}
- Dll::SetTls(NULL);
+ UserSvr::DllSetTls(HLX_SYM_SVR_TLS_LOG_MODE_INDEX, NULL);
delete pScheduler;
delete pCleanupTrap;
@@ -450,9 +451,12 @@
// CHXSymbianServer::SessionClosed
// Invoked when ServerSession is deleted.
// ie., whenever client disconnectes this API is invoked
-void CHXSymbianServer::SessionClosed(CSession2* /*pSession*/)
+void CHXSymbianServer::SessionClosed(CSession2* pSession)
{
- // Not implemented
+ if(m_pServerCtx != NULL)
+ {
+ m_pServerCtx->SessionClosed(pSession);
+ }
}
//
@@ -462,6 +466,11 @@
void CHXSymbianServer::ProcessRunL(TRequestStatus aStatus, TAny* pData)
{
SERVER_LOG( (_L("CHXSymbianServer[%x]::ProcessRunL "), this) );
+ if(m_pServerCtx != NULL)
+ {
+ // Provides option for ctx to cleanup thread specific resource
+ m_pServerCtx->OnServerStop();
+ }
// Shutdown Server
CActiveScheduler::Stop();
Index: pub/platform/symbian/CHXSymbianServer.h
===================================================================
RCS file: /cvsroot/common/system/pub/platform/symbian/CHXSymbianServer.h,v
retrieving revision 1.2
diff -w -u -b -r1.2 CHXSymbianServer.h
--- pub/platform/symbian/CHXSymbianServer.h 25 Jan 2008 22:07:18 -0000 1.2
+++ pub/platform/symbian/CHXSymbianServer.h 19 Oct 2010 22:32:51 -0000
@@ -86,6 +86,8 @@
void SetSecurityPolicy(TSecurityPolicy& aSecurityPolicy);
virtual CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& /*aMessage*/) = 0;
+ virtual void SessionClosed(CSession2*){};
+ virtual void OnServerStop(){};
Index: pub/platform/symbian/CHXSymbianServerDebug.h
===================================================================
RCS file: /cvsroot/common/system/pub/platform/symbian/CHXSymbianServerDebug.h,v
retrieving revision 1.2
diff -w -u -b -r1.2 CHXSymbianServerDebug.h
--- pub/platform/symbian/CHXSymbianServerDebug.h 25 Jan 2008 22:07:18 -0000 1.2
+++ pub/platform/symbian/CHXSymbianServerDebug.h 19 Oct 2010 22:32:51 -0000
@@ -68,6 +68,9 @@
#include <stdio.h>
#include <e32def.h>
#include <flogger.h>
+#include <e32svr.h>
+
+#define HLX_SYM_SVR_TLS_LOG_MODE_INDEX 0xff01
// By default file logging is enabled
//#define SYM_SRV_LOGGING_MODE_CONSOLE 1
@@ -85,7 +88,7 @@
#define SERVER_LOG(X) CHXSymbianServerDebug::NullLog X
#else
#define SERVER_LOG(X) { \
- TInt* pConsoleLogEnabled = (TInt*) Dll::Tls();\
+ TInt* pConsoleLogEnabled = (TInt*) UserSvr::DllTls(HLX_SYM_SVR_TLS_LOG_MODE_INDEX);\
if((pConsoleLogEnabled == NULL) || (*pConsoleLogEnabled == HLX_SYM_SVR_LOG_DISABLED))\
{ \
CHXSymbianServerDebug::NullLog X; \
_______________________________________________
Common-dev mailing list
Common-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/common-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic