×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    43

    unable to make system calls inside thread function

    hi all,
    i have implemented a thread class having an RThread data member. when i create this thread, i am specifying the 'thread function' to be say X(). the problem is that inside the definition of X(), i am not able to do any system calls.also, inside X() accessing any other data member/member function of the thread class is possible. how do i overcome this problem?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    12

    RE: unable to make system calls inside thread function

    hi all,

    can any one put light on this, I am also facing the same problem. I am pasting the sample code for reference.

    ramana.

    RThread mythread;
    mythread.Create(
    _L("mythread&quot,Myfunction,100000,NULL,NULL,EOwnerThread);
    mythread.SetPriority(EPriorityMuchMore);
    mythread.Resume();

    TInt CExampleAppUi::Myfunction(TAny* any)
    {
    //CEikonEnv* eikonEnv=(CEikonEnv*)any;
    CEikonEnv* eikonEnv=CEikonEnv::Static();
    eikonEnv->InfoMsg(_L("Thread Fired&quot);
    return 0;
    }

  3. #3
    Regular Contributor
    Join Date
    Sep 2003
    Posts
    169

    unable to make system calls inside thread function

    Hey,

    I solved this by passing a pointer to the class where I created the thread to the thread and perform all the system calls required in the calss that created the thread.

    Regards, Aljaz

Posting Permissions

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