Lines Matching +full:blocking +full:- +full:io
2 * Copyright (c) 2000-2002, 2004 Proofpoint, Inc. and its suppliers.
16 SM_RCSID("@(#)$Id: fopen.c,v 1.63 2013-11-22 20:51:42 ca Exp $")
23 #include <sm/io.h>
34 ** OPENALRM -- handler when timeout activated for sm_io_open()
39 ** sig -- unused
60 ** REOPENALRM -- handler when timeout activated for sm_io_reopen()
65 ** sig -- unused
87 ** SM_IO_OPEN -- open a file of a specific type
90 ** type -- type of file to open
91 ** timeout -- time to complete the open
92 ** info -- info describing what is to be opened (type dependent)
93 ** flags -- user selected flags
94 ** rpool -- pointer to rpool to be used for this open
100 ** - when the type specific open fails
101 ** - when open vector errors
102 ** - when flags not set or invalid
148 if ((*fp->f_open)(fp, info, flags, rpool) < 0)
150 fp->f_flags = 0; /* release */
151 fp->sm_magic = NULL; /* release */
167 ** SM_IO_DUP -- duplicate a file pointer
170 ** fp -- file pointer to duplicate
173 ** Success - the duplicated file pointer
174 ** Failure - NULL (was an invalid file pointer or too many open)
188 if (fp->sm_magic != SmFileMagic)
193 if (fp->f_dup_cnt >= INT_MAX - 1)
199 fp->f_dup_cnt++;
203 ** SM_IO_REOPEN -- open a new file using the old file pointer
206 ** type -- file type to be opened
207 ** timeout -- time to complete the reopen
208 ** info -- information about what is to be "re-opened" (type dep.)
209 ** flags -- user flags to map to internal flags
210 ** rpool -- rpool file to be associated with
211 ** fp -- the file pointer to reuse
277 if (fp->sm_magic != SmFileMagic)
278 fp->f_flags = SMFEOF; /* hold on to it */
288 ret = (*fp2->f_open)(fp2, info, flags, rpool);
296 fp2->f_flags = 0; /* release */
297 fp2->sm_magic = NULL; /* release */
319 ** SM_IO_AUTOFLUSH -- link another file to this for auto-flushing
325 ** fp -- the file opened for reading.
326 ** fp2 -- the file opened for writing.
343 savefp = fp->f_flushfp;
344 fp->f_flushfp = fp2;
348 ** SM_IO_AUTOMODE -- link another file to this for auto-moding
350 ** When the mode (blocking or non-blocking) changes for fp1 then
357 ** fp1 -- the first file
358 ** fp2 -- the second file
372 fp1->f_modefp = fp2;
373 fp2->f_modefp = fp1;