⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pfm_cleanup.3ncs

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 3NCS
字号:
.\"	@(#)pfm_cleanup.3ncs	8.3 of 3/29/91.TH pfm_cleanup 3ncs.SH Namepfm_cleanup \- establish a clean-up handler.SH Syntax.nf#include <idl/c/base.h>#include <idl/c/pfm.h>status_$t pfm_$cleanup(\fIcleanup_record\fP)pfm_$cleanup_rec *\fIcleanup_record;\fR.fi.\".SH SYNOPSIS (PASCAL).\".DS.\"\fB%include '/sys/ins/base.ins.pas';\fR.\"\fB%include '/sys/ins/ppfm.ins.pas';\fR.\".\"\fBfunction pfm_$cleanup(\fR.\"	\fBout \fIcleanup_record\fB: pfm_$cleanup_rec): status_$t;\fR.\".DE.ig.SH Synopsis (fortran).nf\fB%include '/sys/ins/base.ins.ftn'\fR\fB%include '/sys/ins/pfm.ins.ftn'\fR	 \fBinteger*4 \fIstatus\fB, \fIcleanup_record\fB(16)\fR	 \fIstatus \fB= pfm_$cleanup(\fIcleanup_record\fB)\fR.fi...SH Arguments.TP 20\fIcleanup_record\fRA record of the contextwhen.PN pfm_$cleanupis called.A program should treat this as an opaque data structureand not try to alter or copy its contents.It is needed by .PN pfm_$rls_cleanupand .PN pfm_$reset_cleanupto restore the contextof the calling processat the clean-up handler entry point..SH DescriptionThe .PN pfm_$cleanup.NXR "Fault Management" "pfm_cleanup"routine establishes a clean-up handlerthat is executed when a fault occurs.A clean-up handler is a piece of codeexecuted before a program exitswhen a signal is received by the process.The clean-up handler beginswhere .PN pfm_$cleanupis called;the .PN pfm_$cleanuproutine registersan entry point with the systemwhere program execution resumes when a fault occurs.When a fault occurs,execution resumes after the most recentcall to .PN pfm_$cleanup ..PPThere can be more than one clean-up handler in a program.Multiple clean-up handlers are executed consecutivelyon a last-in/first-out basis,starting with the most recently established handlerand ending with the first clean-up handler.The system provides a default clean-up handlerestablished at program invocation.The default clean-up handler is always called last,just before a program exits,and releases any system resources still held,before returning controlto the process that invoked the program..SH Diagnostics .PPWhen called to establish a clean-up handler,.PN pfm_$cleanupreturns the status .B pfm_$cleanup_setto indicate the clean-up handlerwas successfully established.When the clean-up handler is enteredin response to a fault signal,.PN pfm_$cleanupeffectively returns the value of the fault that triggered the handler..PPThis section lists status codes for errors returned by this .PN pfm_$routine in .PN status.all. .TP 20\fBpfm_$bad_rls_order\fRAttempted to release a clean-up handler out of order..TP 20\fBpfm_$cleanup_not_found\fRThere is no pending clean-up handler..TP 20\fBpfm_$cleanup_set\fRA clean-up handler was established successfully..TP 20\fBpfm_$cleanup_set_signaledl\fRAttempted to use .B pfm_$cleanup_setas a signal..TP 20\fBpfm_$invalid_cleanup_rec\fRPassed an invalid clean-up record to a routine..TP 20\fBpfm_$no_space\fRCannot allocate storage for a clean-up handler..NTClean-up handler code runs with asynchronous faults inhibited.When .PN pfm_$cleanupreturns something other than .B pfm_$cleanup_setindicating that a fault has occurred,there are four possible ways to leave the clean-up code:.RS.IP \(buThe program can call.PN pfm_$signalto start the next clean-up handlerwith a different fault signal. .IP \(bu The program can call .PN pgm_$exitto start the next clean-up handler with the same fault signal. .IP \(buThe program can continue with the code following the clean-up handler.It should generally call .PN pfm_$enableto reenable asynchronous faults.  Execution continues from the end ofthe clean-up handler code; it does not resume where the fault signal wasreceived..IP \(buThe program can reestablish the handler by calling .PN pfm_$reset_cleanupbefore proceeding..RE.NE.SH Files.PN /usr/include/idl/c/base.h.br.PN /usr/include/idl/base.idl.br.PN /usr/include/idl/c/pfm.h.SH See Alsointro(3ncs), pfm_signal(3ncs).\".DM "\.\"path syscalls/pfm/pfm_$cleanup\.\"type referen\.\"book syscalls\.\"chapter pfm\.\"section pfm_$cleanup\.\"".\".DD "\.\"establish(ed)(s)(ing) clean-up cleanup clean(ed)(s)(ing) up handler(s) fault(s) handle(ed)(s)(ing)\.\"pfm pfm_$\.\""

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -