_lwp_create 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_CREATE(2)		    BSD System Calls Manual		_LWP_CREATE(2)

NAME
     _lwp_create — create a new light-weight process

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <lwp.h>

     int
     _lwp_create(ucontext_t *context, unsigned long flags, lwpid_t *new_lwp);

DESCRIPTION
     _lwp_create() causes creation of a new light-weight process, or LWP, and
     adds it to the current process.  The context argument specifies the ini‐
     tial execution context for the new LWP including signal mask, stack, and
     machine registers.	 If this context specifies invalid register values
     (for example priviledge escalation by setting machine dependend bits for‐
     bidden for user processes), or does not specify cpu register values
     (uc_flags does not have the _UC_CPU bit set), the call will fail and
     errno will be set to EINVAL.

     The following flags affect the creation of the new LWP:

     LWP_DETACHED   The LWP is created detached.  The resources associated
		    with a detached LWP will be automatically reclaimed by the
		    system when the LWP exits.	Otherwise, a terminated LWP's
		    resources will not be reclaimed until its status is
		    reported to another LWP via _lwp_wait(2).

     LWP_SUSPENDED  The LWP is created suspended, and will not begin execution
		    until it is resumed by another LWP via _lwp_continue(2).

     The LWP ID of the new LWP is stored in the location pointed to by
     new_lwp.

RETURN VALUES
     Upon successful completion, _lwp_create() returns a value of 0.  Other‐
     wise, a value of -1 is returned and errno is set to one of the values
     documented below.

ERRORS
     _lwp_create() will fail and no LWP will be created if:

     [EAGAIN]  The system-imposed limit on the total number of LWPs under exe‐
	       cution would be exceeded.  This limit is configuration-depen‐
	       dent.

     [ENOMEM]  There is insufficient swap space for the new LWP.

     [EFAULT]  The address pointed to by context or new_lwp is outside the
	       process's allocated address space.

     [EINVAL]  The ucontext_t passed is invalid.

SEE ALSO
     _lwp_continue(2), _lwp_exit(2), _lwp_wait(2), _lwp_makecontext(3)

HISTORY
     The _lwp_create() system call first appeared in NetBSD 2.0.

BSD			       January 13, 2003				   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