Find the answer to your Linux question:
Results 1 to 4 of 4
hi all, I just started working on RH Linux Kernel. Do you have any references for "how to write our own system calls in Linux", which explains step by step ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2004
    Posts
    15

    how to write system calls in Linux


    hi all,
    I just started working on RH Linux Kernel. Do you have any references for "how to write our own system calls in Linux", which explains step by step so that as a beginner i can grab things easily.





    regards,
    Kiran.

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    You mean like open(), read(), fork(), system(), etc.?

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I doubt there are any references for that. In fact, it is generally discouraged that you write new syscalls, snce it involves adding an entry for every architecture and lots of cruft here and there.

    If you just need an entry point from userspace into a kernel function, I would recommend that you instead write a character device (suggestedly a misc device) and implement it as an ioctl.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Quote Originally Posted by Dolda2000
    I doubt there are any references for that. In fact, it is generally discouraged that you write new syscalls, snce it involves adding an entry for every architecture and lots of cruft here and there.

    If you just need an entry point from userspace into a kernel function, I would recommend that you instead write a character device (suggestedly a misc device) and implement it as an ioctl.
    This *is* true, but I have seen references on how to do such a thing before, just can't find the URL.
    But generally, the only people who write new syscalls are the guys working on the kernel itself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •