DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T r

⟦f6aa221fb⟧ TextFile

    Length: 1811 (0x713)
    Types: TextFile
    Names: »rosapintr.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/rosap/rosapintr.c« 

TextFile

/* rosapintr.c - ROPM: invoke (interruptable) */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/rosap/RCS/rosapintr.c,v 7.0 89/11/23 22:21:28 mrose Rel $";
#endif

/* 
 * $Header: /f/osi/rosap/RCS/rosapintr.c,v 7.0 89/11/23 22:21:28 mrose Rel $
 *
 *
 * $Log:	rosapintr.c,v $
 * Revision 7.0  89/11/23  22:21:28  mrose
 * Release 6.0
 * 
 */

/*
 *				  NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


/* LINTLIBRARY */

#include <stdio.h>
#include <signal.h>
#include "rosap.h"

/* \f

 */

static int interrupted;
SFD	intrser ();

/* \f

   RO-INVOKE.REQUEST (interruptable) */

int	RoIntrRequest (sd, op, args, invokeID, linkedID, priority, roi)
int	sd;
int	op,
    	invokeID,
       *linkedID,
	priority;
PE	args;
struct RoSAPindication *roi;
{
    int	    nfds,
	    result;
    fd_set  rfds;
    SFP    istat;

    if (RoInvokeRequest (sd, op, ROS_ASYNC, args, invokeID, linkedID, priority,
			 roi) == NOTOK)
	return NOTOK;

    interrupted = 0;
    istat = signal (SIGINT, intrser);

    for (;;) {
	nfds = 0;
	FD_ZERO (&rfds);

						/* interrupt causes EINTR */
	if (RoSelectMask (sd, &rfds, &nfds, roi) == OK)
	    (void) xselect (nfds, &rfds, NULLFD, NULLFD, NOTOK);

	if (interrupted) {
	    result = rosaplose (roi, ROS_INTERRUPTED, NULLCP, NULLCP);
	    break;
	}

	if ((result = RoWaitRequest (sd, OK, roi)) != NOTOK
	        || roi -> roi_preject.rop_reason != ROS_TIMER)
	    break;
    }

    (void) signal (SIGINT, istat);

    return result;
}

/* \f

 */

/* ARGSUSED */

static  SFD intrser (sig)
int	sig;
{
#ifndef	BSDSIGS
    (void) signal (SIGINT, intrser);
#endif

    interrupted++;
}