Re: The current Macro

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

 



Hi Ohad,

the architecture I'm working on, Infineon's Tricore microcontroller, has 16
general purpose data registers and 16 general purpose address registers (pc,
psw and so on are kept in special core registers). So I guess I have enough
registers to sacrifice one for holding the "current" value. 

You wrote:
> Hi Paul,
> I'll give you two examples:
> On PPC the current is simply defined as the register r2.
> quoting from a vanilla 2.6.11 here (Linux/include/asm-ppc/current.h ) :
> register struct task_struct *current asm ("r2");   
> 

Then there must be a function (or an instruction in a function), which
stores the pointer to the current task_struct in the register r2, right? Do
you know, where that function/instruction can be found in kernel code, so I
can modify it for my register set?

Thanks for your help,
Paul

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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