JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... ucontext_t * ucp ); 説明 System V 的な環境では、 mcontext_t および ucontext_t という 2 つの型と、 getcontext (), setcontext (), makecontext (3), swapcontext (3) という 4 つの関数が < ucontext.h > で ... 間で、 ユーザーレベルのコンテキスト切替えができるようになっている。 mcontext_t 型はマシン依存で、外部からは隠蔽されている。 ucontext_t 型は構造体で、少なくとも以下の 4 つのフィールドを持つ。 typedef struct ucontext_t { struct ucontext_t *uc_link; sigset_t ... uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; ... } ucontext_t; sigset_t と stack_t は < signal.h > で定義されている。 ここで uc_link は、 現在のコンテキストが終了したとき、 続いて切り ... ... ucontext_t * ucp ); 説明 System V 的な環境では、 mcontext_t および ucontext_t という 2 つの型と、 getcontext (), setcontext (), makecontext (3), swapcontext (3) という 4 つの関数が < ucontext.h > で ... 間で、 ユーザーレベルのコンテキスト切替えができるようになっている。 mcontext_t 型はマシン依存で、外部からは隠蔽されている。 ucontext_t 型は構造体で、少なくとも以下の 4 つのフィールドを持つ。 typedef struct ucontext_t { struct ucontext_t *uc_link; sigset_t ... uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; ... } ucontext_t; sigset_t と stack_t は < signal.h > で定義されている。 ここで uc_link は、 現在のコンテキストが終了したとき、 続いて切り ... ... argc , ...); int swapcontext(ucontext_t * oucp , const ucontext_t * ucp ); 説明 In a System V-like environment, one has the type ucontext_t (defined in < uconte ... func1: swapcontext(&uctx_func1, &uctx_func2) func2: returning func1: returning main: exiting プログラムのソース #include < ucontext.h > #include < stdio.h > #include < stdlib.h > static ucontext_t uctx_main, uctx_func1, uctx_func2; #define handle_error(m ... ... argc , ...); int swapcontext(ucontext_t * oucp , const ucontext_t * ucp ); 説明 In a System V-like environment, one has the type ucontext_t (defined in < uconte ... func1: swapcontext(&uctx_func1, &uctx_func2) func2: returning func1: returning main: exiting プログラムのソース #include < ucontext.h > #include < stdio.h > #include < stdlib.h > static ucontext_t uctx_main, uctx_func1, uctx_func2; #define handle_error(m ... ... a the act.sa_sigaction field. This handler takes three arguments, as follows: void handler(int sig, siginfo_t *info, void *ucontext) { ... } These three arguments are as follows sig The number of the signal that caused invocation of the handler. info A p ... ointer to a siginfo_t , which is a structure containing further information about the signal, as described below. ucontext This is a pointer to a ucontext_t structure, cast to void * . The structure pointed to by this field contains signal conte ... mation that was saved on the user-space stack by the kernel; for details, see sigreturn (2). Further information about the ucontext_t structure can be found in getcontext (3) and signal (7). Commonly, the handler function doesn't make any use of the thir ... ... a the act.sa_sigaction field. This handler takes three arguments, as follows: void handler(int sig, siginfo_t *info, void *ucontext) { ... } These three arguments are as follows sig The number of the signal that caused invocation of the handler. info A p ... ointer to a siginfo_t , which is a structure containing further information about the signal, as described below. ucontext This is a pointer to a ucontext_t structure, cast to void * . The structure pointed to by this field contains signal conte ... mation that was saved on the user-space stack by the kernel; for details, see sigreturn (2). Further information about the ucontext_t structure can be found in getcontext (3) and signal (7). Commonly, the handler function doesn't make any use of the thir ... ... ールドに設定してカーネルに伝え、 sa_flags フィールドの SA_RESTORER フラグをセットする。 保存されたプロセスコンテキスト情報は ucontext_t 構造体に置かれる ( < sys/ucontext.h > 参照)。 この構造体は、 sigaction (2) の SA_SIGINFO フラグで設定されたシグナルハンド ... ... ールドに設定してカーネルに伝え、 sa_flags フィールドの SA_RESTORER フラグをセットする。 保存されたプロセスコンテキスト情報は ucontext_t 構造体に置かれる ( < sys/ucontext.h > 参照)。 この構造体は、 sigaction (2) の SA_SIGINFO フラグで設定されたシグナルハンド ... ... o notify I/O completion */ static void /* Handler for I/O completion signal */ aioSigHandler(int sig, siginfo_t *si, void *ucontext) { if (si->si_code == SI_ASYNCIO) { write(STDOUT_FILENO, "I/O completion signal received\n", 31); /* The corresponding ioR ... ... the signal handler was installed using the sigaction (2) SA_SIGINFO flag, then the above information is accessible via the ucontext_t object that is pointed to by the third argument of the signal handler.) d) Any signals specified in act->sa_mask when re ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。