mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* getting a return from a system call
@ 2006-10-17  9:45 Irfan Habib
       [not found] ` <a06230915c15a5acf6842@192.168.2.100>
  0 siblings, 1 reply; 2+ messages in thread
From: Irfan Habib @ 2006-10-17  9:45 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm trying to build a system call which returns a float, and is defined as :
asmlinkage float sys_ph_pinfo(int pid, int mode)

but in a user level program every time, I evaluate it, I always get a return 0!
How do I capture the return of a system call?

Also is it possible that a system call return a structure or array?
Will that be available in user space? My hunch is that this is not
possible, as kernel memory space is disjoint form the user memory
space, but just for information.

Regards,
Irfan

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

* Re: getting a return from a system call
       [not found] ` <a06230915c15a5acf6842@192.168.2.100>
@ 2006-10-17 10:17   ` Irfan Habib
  0 siblings, 0 replies; 2+ messages in thread
From: Irfan Habib @ 2006-10-17 10:17 UTC (permalink / raw)
  To: Jay Vaughan; +Cc: Linux kernel

and what about long? I tried return type long, it also always returned
0, instead of the custom one I was returning

On 10/17/06, Jay Vaughan <jv@access-music.de> wrote:
>
> You can't use floats in kernel system calls ..
>
> j.
>
> At 14:45 +0500 17/10/06, Irfan Habib wrote:
> >Hi,
> >
> >I'm trying to build a system call which returns a float, and is defined as :
> >asmlinkage float sys_ph_pinfo(int pid, int mode)
> >
> >but in a user level program every time, I evaluate it, I always get
> >a return 0!
> >How do I capture the return of a system call?
> >
> >Also is it possible that a system call return a structure or array?
> >Will that be available in user space? My hunch is that this is not
> >possible, as kernel memory space is disjoint form the user memory
> >space, but just for information.
> >
> >Regards,
> >Irfan
> >-
> >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/
>
>
> --
>
> ;
>
> Jay Vaughan
>
>

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

end of thread, other threads:[~2006-10-17 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-17  9:45 getting a return from a system call Irfan Habib
     [not found] ` <a06230915c15a5acf6842@192.168.2.100>
2006-10-17 10:17   ` Irfan Habib

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

all inboxes | Powered by JetHome®