×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    how CCoeEnv::Static() implement

    hi everyone, I have a question, in symbian, it is not suggest use static / global var in dll, on 2nd, it is not allow. but CCoeEnv::Staic, it can give a CCoeEnv object pointer in anywhere. how does the implement? it seems not use TLS, or it is like CActiveSchedule / CleanupStack pointer, every thread has 4 bytes storage for this usage?

    thanks for any explain!
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: how CCoeEnv::Static() implement

    TLS can store one pointer per thread per .dll. And cone.dll certainly uses it for storing its "static" data, which also includes the map of CCoeStatic implementations.

  3. #3
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Re: how CCoeEnv::Static() implement

    but for my test, when app run, Dll::GetTls is NULL, it seems cone not save the pointer in tls?
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: how CCoeEnv::Static() implement

    You are getting your own TLS, and not CONE's. TLS stores one pointer per thread per .dll.

  5. #5
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Re: how CCoeEnv::Static() implement

    thanks wizard, but how CleanupStack and CActiveSchedule implements, i found it in euser.lib both.

    and use Tls is slower 30 times than normal memory access, is it a bottleneck? thanks.
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: how CCoeEnv::Static() implement

    The Cleanup Stack and the Active Scheduler are not related to TLS or anything static.

  7. #7
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Re: how CCoeEnv::Static() implement

    what's your means? can you explain more? if not any static data,
    like CleanupStack::PushL, how does the implement that can push a pointer to current thread's cleanupstack. or CActiveSchedule::Add ?
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: how CCoeEnv::Static() implement

    Ok, they are certainly always accessible. However they are not static variables, but stored by the "executive", and set/get via "exec calls". So from our point of view they are simply part of the thread. You can find some related description in "Symbian OS Internals" (http://developer.symbian.com/main/do...nals/index.jsp).

  9. #9
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Thumbs up Re: how CCoeEnv::Static() implement

    ok, thanks wizard, thanks you very much. thanks!
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

Similar Threads

  1. How to Implement DRM for 3GP and MPEG files
    By Raviprasath in forum Streaming and Video
    Replies: 0
    Last Post: 2008-12-13, 10:11
  2. Use CMMFDevSound Implement FullDuplex Problem
    By yinquan in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2008-03-06, 09:06
  3. Help~~How to implement this project.
    By Melloncx in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-12-24, 11:31
  4. does the 3200 phone implement WMA JSR120 for SMS?
    By marcomagagnini in forum Mobile Java General
    Replies: 0
    Last Post: 2004-01-09, 15:03
  5. How to implement help on 7650.
    By in forum Symbian
    Replies: 0
    Last Post: 2002-10-09, 07:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×