All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viral Mehta <viral.mehta@einfochips.com>
To: linux-kernel@vger.kernel.org
Subject: kernel_thread question
Date: Wed, 18 Mar 2009 17:14:21 +0530	[thread overview]
Message-ID: <49C0DE95.3060402@einfochips.com> (raw)

All,

//My thread routine
int my_thread(void*)
{
    if(printk("blah"))
        return 5; //WHERE THE HELL THIS VALUE GOES !! ?? !! HOW CAN I 
SEE ITS RETURN VALUE ??? PLEASE SUGGEST
    else
       return 0;
//WHERE THE HELL THIS RETURN VALUE GOES !! ?? !! HOW CAN I SEE ITS 
RETURN VALUE ??? PLEASE SUGGEST
//RETURNED 5 or 0 ?? I am amused
}

//my init module
int mod_init()
{
    ...
    int i;
    i = kernel_thread ((void *)my_thread, NULL, 0); //RETURNS NEW PROCESS ID
    ...
}

There is one doubt. Whatever that kernel_thread has started and it 
completes and returns some value. How can I see that value?
-- 
_____________________________________________________________________
Disclaimer: This e-mail message and all attachments transmitted with it
are intended solely for the use of the addressee and may contain legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
__________________________________________________________________________
 

             reply	other threads:[~2009-03-18 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 11:44 Viral Mehta [this message]
2009-03-18 15:25 ` kernel_thread question Stefan Richter

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=49C0DE95.3060402@einfochips.com \
    --to=viral.mehta@einfochips.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.