public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* filling up pt_regs by  myself
@ 2001-12-03 12:15 Aneesh Kumar K.V
  2001-12-04 20:08 ` george anzinger
  0 siblings, 1 reply; 2+ messages in thread
From: Aneesh Kumar K.V @ 2001-12-03 12:15 UTC (permalink / raw)
  To: debian-alpha, linux-kernel

Hi, 

 Is there any functions that i can use to setup pt_regs structure
myself. 

For example how can I take a following  i386 system call  to alpha 

 sys_mycall( struct pt_regs regs)
{
	my_function( &regs);

}

I tried to do it same way . But then the value of members of  regs
structure  that i am  getting are corrupted. Later looking into the
source i found that for most of  alpha  system call is defined something
like 

 sys_mycall( arg1, arg2, arg3.....)

So i replaced the above function definition with 

 sys_mycall( argument1, argument 2 argument ) here consider  it takes
only three arguments ... 

But now how i will pass the regs structure to my_function . Is there any
already existing function that help me to do that something like
save_regs(&regs) ? Or do i need to hand code all the saving by itself.
Can I use SAVE_ALL #define defined in entry.S .

Thanks in advance . 

 -aneesh 
  




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: filling up pt_regs by  myself
  2001-12-03 12:15 filling up pt_regs by myself Aneesh Kumar K.V
@ 2001-12-04 20:08 ` george anzinger
  0 siblings, 0 replies; 2+ messages in thread
From: george anzinger @ 2001-12-04 20:08 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: debian-alpha, linux-kernel

To the best of my knowledge there is NOT a standard way to pass the
pt_regs to a system call.  Each arch does its own thing.  Makes it REAL
hard to write a system call that needs them.  I hope we can define a
standard interface.

George

"Aneesh Kumar K.V" wrote:
> 
> Hi,
> 
>  Is there any functions that i can use to setup pt_regs structure
> myself.
> 
> For example how can I take a following  i386 system call  to alpha
> 
>  sys_mycall( struct pt_regs regs)
> {
>         my_function( &regs);
> 
> }
> 
> I tried to do it same way . But then the value of members of  regs
> structure  that i am  getting are corrupted. Later looking into the
> source i found that for most of  alpha  system call is defined something
> like
> 
>  sys_mycall( arg1, arg2, arg3.....)
> 
> So i replaced the above function definition with
> 
>  sys_mycall( argument1, argument 2 argument ) here consider  it takes
> only three arguments ...
> 
> But now how i will pass the regs structure to my_function . Is there any
> already existing function that help me to do that something like
> save_regs(&regs) ? Or do i need to hand code all the saving by itself.
> Can I use SAVE_ALL #define defined in entry.S .
> 
> Thanks in advance .
> 
>  -aneesh
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
George           george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-04 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-03 12:15 filling up pt_regs by myself Aneesh Kumar K.V
2001-12-04 20:08 ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox