The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

swapcontext (3)
  • swapcontext (2) ( Linux man: Системные вызовы )
  • >> swapcontext (3) ( FreeBSD man: Библиотечные вызовы )
  • swapcontext (3) ( Русские man: Библиотечные вызовы )
  • swapcontext (3) ( Linux man: Библиотечные вызовы )
  • swapcontext (3) ( POSIX man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    
    
    makecontext , swapcontext
    
     - modify and exchange user thread contexts
    
     
    

    LIBRARY

    Lb libc
    
     
    

    SYNOPSIS

       #include <ucontext.h>
    void Fo makecontext Fa ucontext_t *ucp Fa void lp]*funcrp]lp]voidrp] Fa int argc ... Fc Ft int swapcontext (ucontext_t *oucp const ucontext_t *ucp);
     

    DESCRIPTION

    The makecontext ();
    function modifies the user thread context pointed to by Fa ucp , which must have previously been initialized by a call to getcontext(3) and had a stack allocated for it. The context is modified so that it will continue execution by invoking func ();
    with the arguments provided. The Fa argc argument must be equal to the number of additional arguments provided to makecontext ();
    and also equal to the number of arguments to func (,);
    or else the behavior is undefined.

    The Fa ucp->uc_link argument must be initialized before calling makecontext ();
    and determines the action to take when func ();
    returns: if equal to NULL the process exits; otherwise, setcontext (ucp->uc_link);
    is implicitly invoked.

    The swapcontext ();
    function saves the current thread context in Fa *oucp and makes Fa *ucp the currently active context.  

    RETURN VALUES

    If successful, swapcontext ();
    returns zero; otherwise -1 is returned and the global variable errno is set appropriately.  

    ERRORS

    The swapcontext ();
    function will fail if:

    Bq Er ENOMEM
    There is not enough stack space in Fa ucp to complete the operation.

     

    SEE ALSO

    setcontext(3), ucontext(3)


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    ERRORS
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру