*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> kernel_thread_w_arg (9r)              
Title
Content
Arch
Section
 

kernel_thread_w_arg(9r)

Contents


NAME    [Toc]    [Back]

       kernel_thread_w_arg - General: Starts a kernel thread with
       a calling argument passed in

SYNOPSIS    [Toc]    [Back]

       thread_t kernel_thread_w_arg(
               task_t task,
               void (*start) (void),
               void* argument );

ARGUMENTS    [Toc]    [Back]

       Specifies a pointer to a  task  structure.   This  pointer
       identifies  the task in which the kernel_thread_w_arg routine
 starts the newly created kernel thread.  Specifies  a
       pointer to a routine that is the entry point for the newly
       created kernel thread.  Specifies the argument  that  kernel_thread_w_arg
  passes  to  the entry point specified in
       start.

DESCRIPTION    [Toc]    [Back]

       The kernel_thread_w_arg routine creates and starts a  kernel
  thread  in  the specified task at the specified entry
       point with a specified argument.  The  kernel_thread_w_arg
       routine passes the specified argument to the newly created
       kernel thread.  The  kernel_thread_w_arg  routine  creates
       and  starts  a  kernel thread with timeshare scheduling. A
       kernel thread created with timeshare scheduling means that
       its  priority degrades if it consumes an inordinate amount
       of CPU  resources.   A  kernel  module  should  call  kernel_thread_w_arg
  only  for  long-running  tasks. A kernel
       module should always attach a kernel thread to the ``first
       task.''

NOTES    [Toc]    [Back]

       This  routine  is  actually  a convenience wrapper for the
       thread_create routine (which creates  the  kernel  thread)
       and  the thread_start routine (which starts the newly created
 kernel thread).

       The kernel_thread_w_arg  routine  behaves  identically  to
       kernel_isrthread  except that with kernel_thread_w_arg you
       can pass an argument to the entry point for the newly created
 kernel thread.

RETURN VALUES    [Toc]    [Back]

       Upon  successful completion, kernel_thread_w_arg returns a
       pointer to the thread structure associated with the kernel
       thread  started  at the specified entry point. Kernel modules
 can use this pointer as a handle to a specific kernel
       thread  in calls to other kernel threads-related routines.

SEE ALSO    [Toc]    [Back]

      
      
       Routines:     kernel_isrthread(9r),     thread_create(9r),
       thread_start(9r)

       Data Structures: task(9s), thread(9s)



                                          kernel_thread_w_arg(9r)
[ Back ]
 Similar pages
Name OS Title
kernel_isrthread Tru64 General: Starts a fixed priority kernel thread dedicated to interrupt service
select_wakeup Tru64 General: Wakes up a kernel thread
mpsleep Tru64 General: Blocks the current kernel thread
unix_release Tru64 General: Releases binding of the kernel thread
select_enqueue Tru64 General: Adds the current kernel thread
current_thread Tru64 General: Is a pointer to the currently running kernel thread
thread_set_timeout Tru64 General: Sets a timer for the current kernel thread
thread_wakeup_one Tru64 General: Wakes up the first kernel thread waiting on a channel
select_dequeue Tru64 General: Removes the last kernel thread waiting for an event
assert_wait_mesg Tru64 General: Asserts that the current kernel thread is about to block (sleep)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service