_lwp_ctl man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

_LWP_CTL(2)		    BSD System Calls Manual		   _LWP_CTL(2)

NAME
     _lwp_ctl — prepare per-LWP communication area between kernel and userland

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <lwp.h>

     int
     _lwp_ctl(int features, struct lwpctl **address);

DESCRIPTION
     _lwp_ctl() prepares per-LWP communication area for the calling LWP, and
     maps it into the calling process' address space.  It takes the following
     arguments.

     features  The bitwise-OR of the following flags.

	       LWPCTL_FEATURE_CURCPU  Request lc_curcpu.

	       LWPCTL_FEATURE_PCTR    Request lc_pctr.

     address   The address to store a pointer to lwpctl structure for the
	       calling LWP.

     The per-LWP communication area is described by an lwpctl structure.  It
     has following members, depending on features.

     int lc_curcpu  The integral identifier of the CPU on which the LWP is
		    running, or LWPCTL_CPU_NONE when the LWP is not running on
		    any CPU.  It's updated by the kernel and should be consid‐
		    ered as read-only for userland.  It's available only if
		    requested with the LWPCTL_FEATURE_CURCPU flag.

     int lc_pctr    The integer which is incremented on every context switches
		    to the LWP.	 It can be used to detect preemption of the
		    LWP.  (thus its name "preemption counter".)	 It's updated
		    by the kernel and should be considered as read-only for
		    userland.  It's available only if requested with the
		    LWPCTL_FEATURE_PCTR flag.

RETURN VALUES
     _lwp_ctl() returns 0 on success.  Otherwise, -1 is returned and errno is
     set to indicate the error.

SEE ALSO
     errno(2)

BSD				  May 5, 2008				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net