mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-kernel@vger.kernel.org
Subject: Re: system calls-(query)
Date: Tue, 6 Jul 2004 11:24:38 +0200	[thread overview]
Message-ID: <20040706092438.GT18841@lug-owl.de> (raw)
In-Reply-To: <20040706080030.35778.qmail@web8310.mail.in.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]

On Tue, 2004-07-06 09:00:30 +0100, Susheel Raj <susheel_nuguru@yahoo.co.in>
wrote in message <20040706080030.35778.qmail@web8310.mail.in.yahoo.com>:
> i have been trying to understand how the system calls
> are being made by applications and how the kernel
> reacts to them...this is what i got into my brain....
> when an application makes a system call ( for i386)
> %eax register is filled with the system call number
> and some other registers are to be given some
> appropriate values..for example ..if i amke an exit ()
> system call.. then its system call number "1" is
> filled in %eax and the status code is filled in
> %ebx...
>  
> so i want to know what are the requirements for other
> systems calls to execute ...what all registers they
> access..any documentation would be a great help.... 

Userland has to place arguments where the kernel expects them. Have a
look at ./linux/asm-$ARCH/unistd.h to see how syscalls can be made. You
can think of the _syscallX() macros as the lowest-level "function" to
get access to a system call slot. From there, the syscall is usually
dispatched from entry.S.

Syscalls trigger some kind of interrupt or exception; an exception
handler then gets the system call number and dispatches it through the
syscall function pointer's addresses in sys_call_table (in entry.S).

MfG, JBG


-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2004-07-06  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-06  8:00 Susheel Raj
2004-07-06  9:14 ` FabF
2004-07-06  9:24 ` Jan-Benedict Glaw [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040706092438.GT18841@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®