Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7073851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:58:46+00:00 2026-05-28T05:58:46+00:00

In a homework assignment we were asked to add a system call to the

  • 0

In a homework assignment we were asked to add a system call to the Linux Kernel (Red Hat 2.4.18). According to the assignment the return value of the new system call should be void. The system call in itself is quite simple (just one assignment) and there is no chance for error.
From what I read and learnt system calls usually return a negative value to indicate failure or 0 to indicate success. My question is whether this is just a common practice or a must? Can a system call return void?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:58:47+00:00Added an answer on May 28, 2026 at 5:58 am

    In Linux all system calls return long, if they return at all. Say you declare your system call using:

    SYSCALL_DEFINE0(mycall)
    {
        /* ... */
    }
    

    This results in:

    asmlinkage long sys_mycall(void)
    

    If you don’t have any useful return and the call cannot fail, simply return 0 every time to signal success.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a homework assignment where we are asked to implement an evaluation
I have this homework assignment where the user is asked to input numbers and
I just had a homework assignment that wanted me to add all the Java
as part of a homework assignment for my security class, I'm supposed to add
I had a homework assignment that asked for a function that uses direct recursion
For a homework assignment I was given a Card class that has enumerated types
My kiddo had a homework assignment to write Blackjack in Java. I helped him
I got a homework assignment asking me to invoke a function without explicitly calling
I have a homework assignment where I need to take input from a file
As part of a homework assignment in Lisp, I am to use apply or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.