Re: Access thread stack from another thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 6, 2010 at 10:50 AM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
> On Sun, Jun 6, 2010 at 11:34, Group <mailforgroup@xxxxxxxxx> wrote:
>> Thanks for your reply. I agree with what you said. Is there any code related
>> to this available in kernel or any other source? as It would be more helpful
>> to understand this concept.
>



> To the best (in my getting rusty) knowledge, accessing other thread's
> stack can be considered uncommon. At least that's my impression and
> that's might be the reason why there's no definitive API to do that.
> The same like it's uncommon to access other process' address space,
> although it's technically possible.
>
> I suggest, in this case, to use SysV shared memory. So we put the
> "common" data there and other threads access them.
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>

Also, remember the fact that stack frames are transient and the stack
of one thread can be swapped out while the other thread would still
hold a reference to the same (in case of your use case). You must use
some IPC mechanism to do any possible communications across
threads/processes.



> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Regards,
Sandeep.





 	
“To learn is to change. Education is a process that changes the learner.”

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux