Unix-system-calls-getcontext
提供:Dev Guides
[top]#
|http://www.google.com/[Google] | a|
Web | This Site |
選択した読書 Copyright©2014 by finddevguides |
[cols=",,,,,,,",] |
| | Home | | References | | Discussion Forums | | About TP
[width="100%",cols="100%",] |
a| == getcontext()-Unix、Linuxシステムコール
[[File:]] image :http://www.finddevguides.com/images/next.gif [next] image:http://www.finddevguides.com/add- this.gif [AddThisソーシャルブックマークボタン]
広告
NAME
getcontext、setcontext-ユーザーコンテキストの取得または設定
概要
- #include <ucontext.h> *
- int getcontext(ucontext_t * ucp ); * * int setcontext(const ucontext_t * ucp ); *
ここで、
Tag | Description |
---|---|
ucp | points to a structure defined in <ucontext.h> containing the signal mask, execution stack, and machine registers. |
説明
typedef struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; __sigset_t uc_sigmask; struct _fpstate __fpregs_mem; } ucontext_t; |
返り値
規格
これらの関数は、XPG4-UNIXに準拠しています。
ノート
シグナルハンドラが実行されると、現在のユーザーコンテキストが保存され、カーネルによって新しいコンテキストが作成されます。 呼び出しプロセスが longjmp (2)を使用してシグナルハンドラを離れる場合、元のコンテキストは復元できず、 getcontext (2)への今後の呼び出しの結果は予測できません。 この問題を回避するには、シグナルハンドラで longjmp (2)の代わりに siglongjmp (2)または setcontext (2)を使用します。
関連項目
広告
|
[cols="^",] |
|Advertisements