The OpenNET Project / Index page

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

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

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

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

  • BSD mandoc
     

    NAME

    
    
    getcontext , setcontext
    
     - get and set user thread context
    
     
    

    LIBRARY

    Lb libc
    
     
    

    SYNOPSIS

       #include <ucontext.h>
    int getcontext (ucontext_t *ucp);
    int setcontext (const ucontext_t *ucp);
     

    DESCRIPTION

    The getcontext ();
    function saves the current thread's execution context in the structure pointed to by Fa ucp . This saved context may then later be restored by calling setcontext (.);

    The setcontext ();
    function makes a previously saved thread context the current thread context, i.e., the current context is lost and setcontext ();
    does not return. Instead, execution continues in the context specified by Fa ucp , which must have been previously initialized by a call to getcontext (,);
    makecontext(3), or by being passed as an argument to a signal handler (see sigaction(2)).

    If Fa ucp was initialized by getcontext (,);
    then execution continues as if the original getcontext ();
    call had just returned (again).

    If Fa ucp was initialized by makecontext(3), execution continues with the invocation of the function specified to makecontext(3). When that function returns, Fa ucp->uc_link determines what happens next: if Fa ucp->uc_link is NULL the process exits; otherwise, setcontext (ucp->uc_link);
    is implicitly invoked.

    If Fa ucp was initialized by the invocation of a signal handler, execution continues at the point the thread was interrupted by the signal.  

    RETURN VALUES

    If successful, getcontext ();
    returns zero and setcontext ();
    does not return; otherwise -1 is returned.  

    ERRORS

    No errors are defined for getcontext ();
    or setcontext (.);
     

    SEE ALSO

    sigaction(2), sigaltstack(2), makecontext(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
    Добавить, Поддержать, Вебмастеру