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 8634985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:51:36+00:00 2026-06-12T09:51:36+00:00

I have implemented a system call which returns values like 0, 1 and 2,

  • 0

I have implemented a system call which returns values like 0, 1 and 2, according to some conditions in the process priority. I am performing a syscall() in a file. When the system call returns 0, I am getting the return value of syscall() as 0. But, when it return 1 or 2, I am getting -1 for 1 and the system call number for any other values. Please let me know, is it possible to return values apart from 0 and -1.

  • 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-06-12T09:51:38+00:00Added an answer on June 12, 2026 at 9:51 am

    The kernel implementation of a system call does not return a value, it returns an error code. The first argument to your function is a “struct thread”, and you pass the return value back to userspace by setting td->td_retval[0] to the desired return value. See, for example, the implementation of getpid() in sys/kern/kern_prot.c.

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

Sidebar

Related Questions

In my WCF service I have implemented a custom encoder which inherits from System.ServiceModel.Channels.MessageEncoder
I have a data versioning system implemented as a point-in-time architecture in some RDBMS.
I have implemented a DispatcherTimer with databinding which would act like a stopwatch or
I am creating a simple messaging system in WCF and have implemented a minimal
We have implemented a process in one of the systems where it's scheduled to
I'm curious why only some System.Web.UI.WebControl controls implement certain interfaces when they have the
I feel like I'm missing something here, but I have this datagrid which when
I have an (access) database table which contains data I would like to populate
I got an assignment where I have to implement a custom call forwarding system
I have the main page with includes testcomponent1 which inturn includes testcomponent2. Ajax call

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.