/* module vms_drivers.h "X-26" * ************************************************************************* * * * Copyright 2002 Compaq Computer Corporation * * * * COMPAQ Registered in U.S. Patent and Trademark Office. * * * * Confidential computer software. Valid license from Compaq or * * authorized sublicensor required for possession, use or copying. * * Consistent with FAR 12.211 and 12.212, Commercial Computer Software, * * Computer Software Documentation, and Technical Data for Commercial * * Items are licensed to the U.S. Government under vendor's standard * * commercial license. * * * * Compaq shall not be liable for technical or editorial errors or * * omissions contained herein. The information in this document is * * subject to change without notice. * * * ************************************************************************* *++ * FACILITY: * * VMS Executive (LIB) * * ABSTRACT: * * This header file will provide a basic set of C macros for system programmers * and driver writers to use FDT Completion routines. * * AUTHOR: * * Walter D. Blaschuk, Jr. * * CREATION DATE: 14-June-1993 * * MODIFICATION HISTORY: * * X-26 CMOS Christian Moser 23-MAR-2004 * Add new DRIVER$INI_DPT_MAX_UNIT routine. * * X-25 ABP Anu Pant 14-May-2002 * Add support for MPDEV_PATH_SWTCH routine. * * X-24 ABP Anu Pant 1-May-2002 * Fix for PTR 75-83-85: * Set status to NORMAL in the beginning of * device_lock_nospin and device_lock_shr_nospin macros. * * X-23 CMOS Christian Moser 2-OCT-2001 * Add new UCB_LOCK/UCB_UNLOCK macros as a combintation of * the fork/device lock/unlock macros. * * X-22 DEE0601 David E. Eiche 29-Jun-2000 * Add support for the USB CONFIGURE and DECONFIGURE entry * points. * * X-21 JMB219 James M. Blue 9-Mar-2000 * Change the QIOServer helper routine name from QSRV_HLPR * to QSRV_HELPER. * * X-20 JRC John R. Covert 24-Feb-2000 * Add RMdriver Object registration routine defs * MGT_REGISTER and MGT_DEREGISTER * * X-19 JMB202 James M. Blue 10-Jan-2000 * Rename QSRV_COMPLETION to QSRV_HELPER to be more * representative of its function. Rename * QSRV_PATH_NOTIFY to QSRV_EVNT_NOTIFY to be more * representative of its function. * * Add a new FDT table containing QIOServer control * bit masks by function code to be 'OR'ed into * IRP$L_STS2. These settings will direct the handling * of a request by QIOServer's KClient. * * X-18 CMOS Christian Moser 16-AUG-1999 * Add new DEVICE_LOCK and DEVICE_UNLOCK variants to support * sharelocks and nospin locking. * * X-17 JMB094 James M. Blue 22-Mar-1999 * Add initialization macro for the qsrv_completion and * qsrv_path_notify cells that has been added to the ddt. * * X-16 GP Genady Perchenko 06-Jul-1998 * Renames driver$ini_dpt_dsplypath_ucb_ofs to * driver$ini_dpt_dsplypath_ucb_of in order to fit it * within 31 characters. * * X-15 GP Genady Perchenko 23-Jun-1998 * Add ini_dpt_dsplypath_size and ini_dpt_dsplypath_ofs * function prototypes. * * X-14 CMOS Christian Moser 20-APR-1998 * Add fastpath FDT and upcall routines (SETPRFPATH and * CHANGE_PREFERRED). * * X-13 GP Genady Perchenko 12-Dec-1997 * Fiber Channel Device Naming Project: Add * ini_dpt_devpath_size, ini_dpt_devpath_ucb_ofs and * ini_ddt_make_devpath macros. See DPTDEF.SDL and DDTDEF.SDL * for information on associated fields. * * See the design document in * STAR::DOCD$:[EVMS.PROJECT_DOCUMENTS]FC_NAMING.PS for more * details * * X-12 DEE0232 David E. Eiche 10-Jan-1996 * Add DDT macros for DDT entry FUNCTAB. * * X-11 PJH Paul J. Houlihan 26-Jun-1995 * Add DDT macro for pending I/O routine. * * X-10 JCH703 John C. Hallyburton, Jr. 23-Jan-1995 * Add DDT macros for DDT entry FAST_FDT. * DOCD$:[EVMS.PROJECT_DOCUMENTS]FS-FASTIO.PS;1 * Add once-only #include code * * X-9 LSS0311 Leonard S. Szubowicz 19-Oct-1994 * Add definitions of FDT_x_64 constants that can be used with the * ini_fdt_act macro to declare functions that support a 64-bit * $QIO P1 parameter. See "Chapter 20: QIO and Device Drivers" in * DOCD$:[EVMS.CMS_64B]DS-64BITS.PS. * * X-8 JPJ James P. Janetos 05-May-1994 * Get rid of form feed. * * X-7 ROW0843 Ralph O. Weber 20-DEC-1993 13:38 * Add driver initialization support for DPT$IW_IOHANDLES, * the number of I/O Handles the driver needs to save, and * DDT$PS_CSR_MAPPING, the pointer to the driver's CSR mapping * initialization routine. * * X-6 DEE0203 David E. Eiche 01-Nov-1993 * Move the device driver table initialization routine prototypes * into this module from ioc_routines.h. Add one macro per * initialization routine to invoke the routine, check the status * returned and exit if the status isn't a success code. Define * codes for BUFFERED and NOT_BUFFERED (DIRECT) I/O. * * X-5 DEE0202 David E. Eiche 13-Oct-1993 * Add the dpt_store_isr_vec macro to allow the driver writer * to store an ISR PD and entry point address in any one of what * may be several VEC entries in the CRB. Redefine the dpt_store_isr * macro in terms of dpt_store_isr_vec to fill in the first or * only VEC entry in a CRB. * * X-4 DEE0201 David E. Eiche 08-Oct-1993 * Add the dpt_store_isr macro definition. * * X-3 LSS0285 Leonard S. Szubowicz 27-Aug-1993 * Revised and more complete forms of the device driver synchro- * nization macros as described in EVMS$IO_DOC:HLLDD-FORK.MEM. * Also, change names of FDT completion macros from $x to CALL_x. * * X-2 LSS0282 Leonard S. Szubowicz 21-Jul-1993 * Initial versions of some device driver synchronization macros. * * X-1 WDB:HLL63 Walter D. Blaschuk, Jr. 14 June 1993 * HLLDD Project: C macros for Step 2 FDT Completion routines. * EVMS$IO_DOC:[IO.CMS]FDT_DESIGN. * *-- */ #ifndef __VMS_DRIVERS_LOADED #define __VMS_DRIVERS_LOADED 1 /* Include files */ #include #include #include #include #include #include #include #include #include #include #include #include #include /* Macro to set up and call the Step 2 FDT Completion routine EXE_STD$ABORTIO. This will always return SS$_FDT_COMPL. */ #define call_abortio(irp,pcb,ucb,final_status) \ ( \ exe_std$abortio(irp,pcb,ucb,final_status) \ ) /* Macro to set up and call the Step 2 FDT Completion routine EXE_STD$FINISHIO. This macro fills in but the first and second longword of the IOST in the IRP. This will always return SS$_FDT_COMPL. */ #define call_finishio(irp,ucb,iost1,iost2) \ ( \ irp->irp$l_iost1 = iost1, \ irp->irp$l_iost2 = iost2, \ exe_std$finishio(irp,ucb) \ ) /* Macro to set up and call the Step 2 FDT Completion routine EXE_STD$FINISHIO with status in the first longword and zero in the second longword of the IOST in the IRP.. This will always return SS$_FDT_COMPL. */ #define call_finishioc(irp,ucb,iost1) \ ( \ irp->irp$l_iost1 = iost1, \ irp->irp$l_iost2 = 0, \ exe_std$finishio(irp,ucb) \ ) /* Macro to set up and call the Step 2 FDT Completion routine EXE_STD$FINISHIO. The macro does not touch the IOST fields in the IRP. This will always return SS$_FDT_COMPL. */ #define call_finishio_noiost(irp,ucb) \ ( \ exe_std$finishio(irp,ucb) \ ) /* Macro to set up and call the Step 2 FDT Completion routine EXE_STD$QIOACPPKT. */ #define call_qioacppkt(irp,pcb,ucb) \ ( \ exe_std$qioacppkt(irp,pcb,ucb) \ ) /* Macro to set up and call the Step 2 FDT Completion routine EXE_STD$QIODRVPKT. This macro zeros the FDT Context ptr. in the IRP then calls EXE_STD$INSIOQ. This will always return SS$_FDT_COMPL. */ #define call_qiodrvpkt(irp,ucb) \ ( \ irp->irp$ps_fdt_context = 0, \ exe_std$insioq(irp,ucb), \ SS$_FDT_COMPL \ ) /* Macro to set up and call the Step 2 FDT Completion routine EXE_STD$IORSNWAIT. This will always return SS$_FDT_COMPL. */ #define call_iorsnwait(irp,pcb,ucb,ccb,final_status,resource_num) \ ( \ exe_std$iorsnwait(irp,pcb,ucb,ccb,final_status,resource_num) \ ) /* Define some constants used by the device_lock, device_unlock, fork_lock, and fork_unlock macros */ #define NOSAVE_IPL ((int *) 0) /* don't save original IPL */ #define NOLOWER_IPL -1 /* don't lower IPL on unlock */ #define NORAISE_IPL 0 /* don't raise IPL on lock */ #define RAISE_IPL 1 /* do raise IPL on lock */ #define SMP_RELEASE 0 /* unconditionally release spinlock */ #define SMP_RESTORE 1 /* conditionally release spinlock */ /* * The device_lock macro is used to acquire a device spinlock and to * optionally save the original IPL. * * The format of the device_lock macro is: * * device_lock (lockaddr, raise_ipl, savipl_p) * * Inputs: * * lockaddr is a pointer to the device spinlock structure of * type SPL. * * raise_ipl is either the integer value RAISE_IPL or * NORAISE_IPL. The symbol RAISE_IPL is defined to be * 1 and the symbol NORAISE_IPL is defined to be 0 by * the vms_drivers.h file. If raise_ipl is equal to * RAISE_IPL, then the IPL is set using the value in * the spinlock structure. * * Outputs: * * savipl_p is a 32-bit integer passed by reference in which * the original IPL is returned. If the address of * this parameter is NOSAVE_IPL, then the current IPL * is not returned. The symbol NOSAVE_IPL is defined * to be a null pointer, i.e. ((int *) 0), by the * vms_drivers.h file. * * status is a 32-bit integer passed by reference in which * the status of the lock operation is returned. The * _NOSPIN variants will return either SS$_NORMAL or * SS_$INUSE, depending, if the spinlock was locked or * not. * * For example, in a driver fork routine one could save the current IPL * and take the device lock by: * * device_lock (ucb->ucb$l_dlck, RAISE_IPL, &orig_ipl); * * However, in an interrupt service routine, where the IPL is already * known to be at device IPL one could take the device lock and leave the * IPL unchanged by: * * device_lock (ucb->ucb$l_dlck, NORAISE_IPL, NOSAVE_IPL); */ #define device_lock(lockaddr, raise_ipl, savipl_p) \ { \ extern SMP smp$gl_flags; \ \ if(savipl_p != NOSAVE_IPL) \ *savipl_p = __PAL_MFPR_IPL(); \ \ if(raise_ipl == NORAISE_IPL) { \ if(smp$gl_flags.smp$v_enabled) \ smp_std$acqnoipl( lockaddr ); \ } \ else { \ if(smp$gl_flags.smp$v_enabled) \ smp_std$acquirel( lockaddr ); \ else \ __PAL_MTPR_IPL( lockaddr->spl$l_ipl ); \ } \ } #define device_lock_shr(lockaddr, raise_ipl, savipl_p) \ { \ extern SMP smp$gl_flags; \ \ if(savipl_p != NOSAVE_IPL) \ *savipl_p = __PAL_MFPR_IPL(); \ \ if(raise_ipl == NORAISE_IPL) { \ if(smp$gl_flags.smp$v_enabled) \ smp_std$acqnoipl_shr( lockaddr ); \ } \ else { \ if(smp$gl_flags.smp$v_enabled) \ smp_std$acquirel_shr( lockaddr ); \ else \ __PAL_MTPR_IPL( lockaddr->spl$l_ipl ); \ } \ } #define device_lock_nospin(lockaddr, raise_ipl, savipl_p, status) \ { \ extern SMP smp$gl_flags; \ *(int *)status = SS$_NORMAL; \ \ if(savipl_p != NOSAVE_IPL) \ *savipl_p = __PAL_MFPR_IPL(); \ \ if(raise_ipl == NORAISE_IPL) { \ if(smp$gl_flags.smp$v_enabled) \ *(int *)status = smp_std$acqnoipl_nospin( lockaddr ); \ } \ else { \ if(smp$gl_flags.smp$v_enabled) \ *(int *)status = smp_std$acquirel_nospin( lockaddr ); \ else \ { \ __PAL_MTPR_IPL( lockaddr->spl$l_ipl ); \ *(int *)status = SS$_NORMAL; \ } \ } \ } #define device_lock_shr_nospin(lockaddr, raise_ipl, savipl_p, status) \ { \ extern SMP smp$gl_flags; \ *(int *)status = SS$_NORMAL; \ \ if(savipl_p != NOSAVE_IPL) \ *savipl_p = __PAL_MFPR_IPL(); \ \ if(raise_ipl == NORAISE_IPL) { \ if(smp$gl_flags.smp$v_enabled) \ *(int *)status = smp_std$acqnoipl_shr_nospin( lockaddr ); \ } \ else { \ if(smp$gl_flags.smp$v_enabled) \ *(int *)status = smp_std$acquirel_shr_nospin( lockaddr ); \ else \ { \ __PAL_MTPR_IPL( lockaddr->spl$l_ipl ); \ *(int *)status = SS$_NORMAL; \ } \ } \ } #define device_lock_cvt_to_shr(lockaddr ) \ { \ extern SMP smp$gl_flags; \ \ if(smp$gl_flags.smp$v_enabled) \ smp_std$cvt_to_shared( lockaddr ); \ else \ __PAL_MTPR_IPL( lockaddr->spl$l_ipl ); \ } #define device_lock_cvt_to_ex(lockaddr, status ) \ { \ extern SMP smp$gl_flags; \ \ if(smp$gl_flags.smp$v_enabled) \ *(int *)status = smp_std$cvt_to_ex( lockaddr ); \ else \ { \ __PAL_MTPR_IPL( lockaddr->spl$l_ipl ); \ *(int *)status = SS$_NORMAL; \ } \ } /* * The device_unlock macro is used to either release or restore (i.e. * conditionally release) a device spinlock and to optionally set a new * IPL. * * The format of the device_unlock macro is: * * device_unlock (lockaddr, newipl, restore) * * Inputs: * * lockaddr is a pointer to the device spinlock structure of * type SPL. * * newipl is the integer value of the desired new IPL or the * value NOLOWER_IPL if the IPL should be left * unchanged. The symbol NOLOWER_IPL is defined to be * -1 by the vms_drivers.h file. * * restore is the either the integer value SMP_RESTORE or * SMP_RELEASE. If SMP_RELEASE is specified then the * spinlock is unconditionally released by calling * SMP_STD$RELEASEL, otherwise the spinlock is * conditionally released by calling SMP_STD$RESTOREL. * The symbol SMP_RESTORE is defined to be 1 and the * symbol SMP_RELEASE is defined to be 0 by the * vms_drivers.h file. * * For example, in a driver fork routine one could release the device * lock and restore the previously saved IPL by: * * device_unlock (ucb->ucb$l_dlck, orig_ipl, SMP_RELEASE); * * However, in an interrupt service routine, one could release the * device lock and stay at the current IPL by: * * device_unlock (ucb->ucb$l_dlck, NOLOWER_IPL, SMP_RELEASE); */ #define device_unlock(lockaddr, newipl, restore) \ { \ extern SMP smp$gl_flags; \ \ if(smp$gl_flags.smp$v_enabled) { \ if(restore == SMP_RELEASE) \ smp_std$releasel( lockaddr ); \ else \ smp_std$restorel( lockaddr ); \ } \ if(newipl >= 0) \ __PAL_MTPR_IPL( newipl ); \ } #define device_unlock_shr(lockaddr, newipl, restore) \ { \ extern SMP smp$gl_flags; \ \ if(smp$gl_flags.smp$v_enabled) { \ if(restore == SMP_RELEASE) \ smp_std$releasel_shr( lockaddr ); \ else \ smp_std$restorel_shr( lockaddr ); \ } \ if(newipl >= 0) \ __PAL_MTPR_IPL( newipl ); \ } /* * The dpt_store_isr and dpt_store_isr_vec macros are used to store * the procedure descriptor and entry point addresses of an interrupt * service routine into a VEC entry in a given CRB. The dpt_store_isr * macro selects the first or only VEC entry in a CRB. The * dpt_store_isr_vec macro allows the number of the vector to be * supplied. * * The formats of the macros are: * * dpt_store_isr_vec (crb, vecno, isr) * * and * * dpt_store_isr (crb, isr) * * where: * * crb is a pointer to the Channel Request Block * vecno is the index (0, 1, 2, ...) of the VEC entry to be filled in * isr is the procedure descriptor of the Interrupt Service Routine * */ #define dpt_store_isr_vec( crb, vecno, isr ) { \ struct __pd { int :32; int :32; void *entry; } \ *_pdp = ( struct __pd *)(isr); \ ((VEC *)&((crb)->crb$l_intd) + (vecno))->vec$ps_isr_pd = (isr); \ ((VEC *)&((crb)->crb$l_intd) + (vecno))->vec$ps_isr_code = _pdp->entry; } #define dpt_store_isr( crb, isr ) dpt_store_isr_vec( crb, 0, isr ) /* * The fork macro is used to queue a specified fork routine with * specified fork routine parameters. After the fork routine is * queued, execution continues with the next statement following the * fork macro. * * The format of the fork macro is: * * fork (fork_routine, fr3, fr4, fkb) * * Inputs: * * fork_routine is the procedure value of the routine that is to * be executed in a fork thread. This value is * passed to the fork dispatcher via fkb->fkb$l_fpc. * * fr3 is the 64-bit value to pass to the fork routine * via fkb->fkb$q_fr3. This parameter is cast as a * 64-bit integer. * * fr4 is the 64-bit value to pass to the fork routine * via fkb->fkb$q_fr4. This parameter is cast as a * 64-bit integer. * * fkb is a pointer to the fork block. This parameter * is cast as a pointer to an FKB. */ #define fork(fork_routine, fr3, fr4, fkb) \ { \ ((FKB *) fkb)->fkb$l_fpc = fork_routine; \ ((FKB *) fkb)->fkb$q_fr3 = (__int64) fr3; \ ((FKB *) fkb)->fkb$q_fr4 = (__int64) fr4; \ exe_std$queue_fork( (FKB *) fkb ); \ } /* * The fork_lock macro is used to acquire a fork spinlock and to * optionally save the original IPL. * * The format of the fork_lock macro is: * * fork_lock (lockidx, savipl_p) * * Inputs: * * lockidx is the integer value of the spinlock index. * * Outputs: * * savipl_p is a 32-bit integer passed by reference in which * the original IPL is returned. If the address of * this parameter is NOSAVE_IPL, then the original * IPL is not returned. The symbol NOSAVE_IPL is * defined to be a null pointer, i.e. ((int *) 0), * by the vms_drivers.h file. * * For example, one can take the UCB fork lock and store the original * IPL by: * * fork_lock (ucb->ucb$b_flck, &orig_ipl); * If there is no need to save the original IPL, then one can take the * fork lock by: * * fork_lock (ucb->ucb$b_flck, NOSAVE_IPL); */ #define fork_lock(lockidx, savipl_p) \ { \ extern SMP smp$gl_flags; \ extern int smp$al_iplvec[]; \ \ if(savipl_p != NOSAVE_IPL) \ *savipl_p = __PAL_MFPR_IPL(); \ \ if(smp$gl_flags.smp$v_enabled) \ smp_std$acquire( lockidx ); \ else \ __PAL_MTPR_IPL( smp$al_iplvec[lockidx] ); \ } /* * The fork_unlock macro is used to either release or restore (i.e. * conditionally release) a fork spinlock and to optionally set a new * IPL. * * The format of the fork_unlock macro is: * * fork_unlock (lockidx, newipl, restore) * * Inputs: * * lockidx is the integer value of the spinlock index. * * newipl is the integer value of the desired new IPL or * the value NOLOWER_IPL if the IPL should be left * unchanged. The symbol NOLOWER_IPL is defined to * be -1 by the vms_drivers.h file. * * restore is the either the integer value SMP_RESTORE or * SMP_RELEASE. If SMP_RELEASE is specified then * the spinlock is unconditionally released by * calling SMP_STD$RELEASE, otherwise the spinlock * is conditionally released by calling * SMP_STD$RESTORE. The symbol SMP_RESTORE is * defined to be 1 and the symbol SMP_RELEASE is * defined to be 0 by the vms_drivers.h file. * * For example, one can conditionally release the UCB fork lock and set * IPL by: * * fork_unlock (ucb->ucb$b_flck, orig_ipl, SMP_RESTORE); * * If there is no need to change IPL, then one can conditionally * release the fork lock by: * * fork_unlock (ucb->ucb$b_flck, NOLOWER_IPL, SMP_RESTORE); */ #define fork_unlock(lockidx, newipl, restore) \ { \ extern SMP smp$gl_flags; \ \ if(smp$gl_flags.smp$v_enabled) { \ if(restore == SMP_RELEASE) \ smp_std$release( lockidx ); \ else \ smp_std$restore( lockidx ); \ } \ if(newipl >= 0) \ __PAL_MTPR_IPL( newipl ); \ } /* * The ucb_lock macro is used to acquire a fork or device spinlock and * to optionally save the original IPL. * * The format of the ucb_lock macro is: * * ucb_lock (ucb, raise_ipl, savipl_p) * * Inputs: * * ucb is address of a UCB structure. * * raise_ipl is either the integer value RAISE_IPL or * NORAISE_IPL. The symbol RAISE_IPL is defined to be * 1 and the symbol NORAISE_IPL is defined to be 0 by * the vms_drivers.h file. If raise_ipl is equal to * RAISE_IPL, then the IPL is set using the value in * the spinlock structure. * * Outputs: * * savipl_p is a 32-bit integer passed by reference in which * the original IPL is returned. If the address of * this parameter is NOSAVE_IPL, then the original * IPL is not returned. The symbol NOSAVE_IPL is * defined to be a null pointer, i.e. ((int *) 0), * by the vms_drivers.h file. * */ #define ucb_lock(ucb, raise_ipl, savipl_p) \ { \ extern SMP smp$gl_flags; \ extern int smp$al_iplvec[]; \ extern SPL_PPL smp$ar_spnlkvec; \ \ if (savipl_p != NOSAVE_IPL) \ *savipl_p = __PAL_MFPR_IPL(); \ \ if (raise_ipl == NORAISE_IPL) \ { \ if (smp$gl_flags.smp$v_enabled) \ { \ if (ucb->ucb$b_flck < SPL$_MIN_INDEX) \ smp_std$acqnoipl( ucb->ucb$l_dlck ); \ else \ smp_std$acqnoipl( (SPL *)smp$ar_spnlkvec[ucb->ucb$b_flck] ); \ } \ } \ else \ { \ if (smp$gl_flags.smp$v_enabled) \ { \ if (ucb->ucb$b_flck < SPL$_MIN_INDEX) \ smp_std$acquirel( ucb->ucb$l_dlck ); \ else \ smp_std$acquire( ucb->ucb$b_flck ); \ } \ else \ __PAL_MTPR_IPL( smp$al_iplvec[ucb->ucb$b_flck] ); \ } \ } /* * The ucb_unlock macro is used to either release or restore (i.e. * conditionally release) a fork or device spinlock and to optionally set * a new IPL. * * The format of the ucb_unlock macro is: * * ucb_unlock (ucb, newipl, restore) * * Inputs: * * ucb is the address of a UCB structure. * * newipl is the integer value of the desired new IPL or * the value NOLOWER_IPL if the IPL should be left * unchanged. The symbol NOLOWER_IPL is defined to * be -1 by the vms_drivers.h file. * * restore is the either the integer value SMP_RESTORE or * SMP_RELEASE. If SMP_RELEASE is specified then * the spinlock is unconditionally released by * calling SMP_STD$RELEASE, otherwise the spinlock * is conditionally released by calling * SMP_STD$RESTORE. The symbol SMP_RESTORE is * defined to be 1 and the symbol SMP_RELEASE is * defined to be 0 by the vms_drivers.h file. * */ #define ucb_unlock(ucb, newipl, restore) \ { \ extern SMP smp$gl_flags; \ extern int smp$al_iplvec[]; \ extern SPL_PPL smp$ar_spnlkvec; \ \ if (smp$gl_flags.smp$v_enabled) \ { \ if (restore == SMP_RELEASE) \ { \ if (ucb->ucb$b_flck < SPL$_MIN_INDEX) \ smp_std$releasel( ucb->ucb$l_dlck ); \ else \ smp_std$release( ucb->ucb$b_flck ); \ } \ else \ { \ if (ucb->ucb$b_flck < SPL$_MIN_INDEX) \ smp_std$restorel( ucb->ucb$l_dlck ); \ else \ smp_std$restore( ucb->ucb$b_flck ); \ } \ } \ \ if (newipl >= 0) \ __PAL_MTPR_IPL( newipl ); \ } /* * The fork_wait macro is used to queue a specified fork routine with * specified fork routine parameters for delayed execution. After the * fork routine is queued, execution continues with the next statement * following the fork macro. * * The format of the fork_wait macro is: * * fork_wait (fork_routine, fr3, fr4, fkb) * * Inputs: * * fork_routine is the procedure value of the routine that is to * be executed in a fork thread. This value is * passed to the fork dispatcher via fkb->fkb$l_fpc. * * fr3 is the 64-bit value to pass to the fork routine * via fkb->fkb$q_fr3. This parameter is cast as a * 64-bit integer. * * fr4 is the 64-bit value to pass to the fork routine * via fkb->fkb$q_fr4. This parameter is cast as a * 64-bit integer. * * fkb is a pointer to the fork block. This parameter * is cast as a pointer to an FKB. */ #define fork_wait(fork_routine, fr3, fr4, fkb) \ { \ ((FKB *) fkb)->fkb$l_fpc = fork_routine; \ exe_std$primitive_fork_wait( (__int64) fr3, (__int64) fr4, \ (FKB *) fkb ); \ } /* * The iofork macro is used to queue a fork routine with specified fork * routine parameters. This macro is very similar to fork, except that * the fork block is assumed to be a UCB and the ucb$v_tim bit is cleared * before the fork routine is queued. * * The format of the iofork macro is: * * iofork (fork_routine, fr3, fr4, ucb) * * Inputs: * * fork_routine is the procedure value of the routine that is to be * executed in a fork thread. This value is passed to * the fork dispatcher via ucb->ucb$l_fpc. * * fr3 is the 64-bit value to pass to the fork routine via * ucb->ucb$q_fr3. This parameter is cast as a 64-bit * integer. * * fr4 is the 64-bit value to pass to the fork routine via * ucb->ucb$q_fr4. This parameter is cast as a 64-bit * integer. * * ucb is a pointer to the unit control block. This * parameter is cast as a pointer to a UCB. */ #define iofork(fork_routine, fr3, fr4, ucb) \ { \ ((UCB *) ucb)->ucb$v_tim = 0; \ fork( fork_routine, fr3, fr4, ucb); \ } /* * The rfi macro can be used in an interrupt service routine to invoke * the resume from interrupt routine that has been set up by either the * wfikpch or wfirlch macros. The interface for the resume from * interrupt routine is described in section 4.7. * * The format of the rfi macro is: * * rfi (irp, fr4, ucb) * * Inputs: * * irp is a usually a pointer to an IRP type, but can be * any value which is expected as the first parameter * of the resume from interrupt routine. * * fr4 is any value which is expected as the second * parameter of the resume from interrupt routine. * * ucb is a pointer to a Unit Control Block and is the * third parameter of the resume from interrupt * routine. This parameter is cast as a pointer to an * UCB. */ #define rfi(irp, fr4, ucb) \ ( *((UCB *) ucb)->ucb$l_fpc ) (irp, fr4, ucb) /* * The wfikpch macro is used to setup an interrupt resume routine and a * device interrupt timeout routine without releasing the channel (i.e. * CRB). * * The format of the wfikpch macro is: * * wfikpch (resume_rout, tout_rout, irp, fr4, ucb, tmo, restore_ipl) * * Inputs: * * resume_rout is the procedure value of the resume from interrupt * routine that is to be called by the interrupt * service routine. This value is passed to the * interrupt service routine via ucb->ucb$l_fpc. This * routine is discussed in sections 2.3, 4.7, and 5.6. * * tout_rout is the procedure value of the device interrupt * timeout routine that may be called by EXE$TIMEOUT. * This value is passed via ucb->ucb$ps_toutrout. * This routine is described in section 4.6. * * irp is a pointer to an IRP type which is passed to the * interrupt resume or timeout routine via * ucb->ucb$q_fr3. * * fr4 is a 64-bit value to pass to the resume from * interrupt or timeout routine via ucb->ucb$q_fr4. * This parameter is cast as a 64-bit integer. * * ucb is a pointer to a Unit Control Block. This * parameter is cast as a pointer to an UCB. * * tmo is an integer specifying the timeout value in * seconds. * * restore_ipl is an integer specifying the IPL to lower to prior * to returning. * * For example, a driver start I/O routine might use the wfikpch macro in * the following fashion, where start_device_xfer is a device specific * routine implemented in the driver: * * { * device_lock (ucb->ucb$l_dlck, RAISE_IPL, &orig_ipl); * start_device_xfer ( ucb, irp ); * wfikpch (resume_rout, tout_rout, irp, 0, ucb, 3, orig_ipl); * return; * } */ #define wfikpch(resume_rout, tout_rout, irp, fr4, ucb, tmo, restore_ipl) \ { \ ((UCB *) ucb)->ucb$l_fpc = resume_rout; \ ((UCB *) ucb)->ucb$ps_toutrout = tout_rout; \ ioc_std$primitive_wfikpch (irp, (__int64) fr4, (UCB *) ucb, \ tmo, restore_ipl ); \ } /* * The wfirlch macro is used to setup an interrupt resume routine and a * device interrupt timeout routine, and to release the channel (i.e. * CRB). * * wfirlch (resume_rout, tout_rout, irp, fr4, ucb, tmo, restore_ipl) * * The wfirlch macro works just like the wfikpch macro with the exception * that wfirlch calls routine IOC_STD$PRIMITIVE_WFIRLCH instead of * IOC_STD$PRIMITIVE_WFIKPCH. In all other respects the description of * the parameters of the wfikpch macro in applies to the wfirlch macro. */ #define wfirlch(resume_rout, tout_rout, irp, fr4, ucb, tmo, restore_ipl) \ { \ ((UCB *) ucb)->ucb$l_fpc = resume_rout; \ ((UCB *) ucb)->ucb$ps_toutrout = tout_rout; \ ioc_std$primitive_wfirlch (irp, (__int64) fr4, (UCB *) ucb, \ tmo, restore_ipl ); \ } /* Device driver table initialization * Map lower case function names into upper case */ #define driver$ini_ddt_altstart DRIVER$INI_DDT_ALTSTART #define driver$ini_ddt_aux_routine DRIVER$INI_DDT_AUX_ROUTINE #define driver$ini_ddt_aux_storage DRIVER$INI_DDT_AUX_STORAGE #define driver$ini_ddt_cancel DRIVER$INI_DDT_CANCEL #define driver$ini_ddt_cancel_selective DRIVER$INI_DDT_CANCEL_SELECTIVE #define driver$ini_ddt_change_preferred DRIVER$INI_DDT_CHANGE_PREFERRED #define driver$ini_ddt_channel_assign DRIVER$INI_DDT_CHANNEL_ASSIGN #define driver$ini_ddt_cloneducb DRIVER$INI_DDT_CLONEDUCB #define driver$ini_ddt_configure DRIVER$INI_DDT_CONFIGURE #define driver$ini_ddt_ctrlinit DRIVER$INI_DDT_CTRLINIT #define driver$ini_ddt_csr_mapping DRIVER$INI_DDT_CSR_MAPPING #define driver$ini_ddt_deconfigure DRIVER$INI_DDT_DECONFIGURE #define driver$ini_ddt_diagbf DRIVER$INI_DDT_DIAGBF #define driver$ini_ddt_erlgbf DRIVER$INI_DDT_ERLGBF #define driver$ini_ddt_fast_fdt DRIVER$INI_DDT_FAST_FDT #define driver$ini_ddt_functab DRIVER$INI_DDT_FUNCTAB #define driver$ini_ddt_kp_reg_mask DRIVER$INI_DDT_KP_REG_MASK #define driver$ini_ddt_kp_stack_size DRIVER$INI_DDT_KP_STACK_SIZE #define driver$ini_ddt_kp_startio DRIVER$INI_DDT_KP_STARTIO #define driver$ini_ddt_make_devpath DRIVER$INI_DDT_MAKE_DEVPATH #define driver$ini_ddt_mntv_for DRIVER$INI_DDT_MNTV_FOR #define driver$ini_ddt_mntver DRIVER$INI_DDT_MNTVER #define driver$ini_ddt_pending_io DRIVER$INI_DDT_PENDING_IO #define driver$ini_ddt_qsrv_helper DRIVER$INI_DDT_QSRV_HELPER #define driver$ini_ddt_qsrv_evnt_notify DRIVER$INI_DDT_QSRV_EVNT_NOTIFY #define driver$ini_ddt_mgt_register DRIVER$INI_DDT_MGT_REGISTER #define driver$ini_ddt_mgt_deregister DRIVER$INI_DDT_MGT_DEREGISTER #define driver$ini_ddt_regdmp DRIVER$INI_DDT_REGDMP #define driver$ini_ddt_setprfpath DRIVER$INI_DDT_SETPRFPATH #define driver$ini_ddt_start DRIVER$INI_DDT_START #define driver$ini_ddt_unitinit DRIVER$INI_DDT_UNITINIT #define driver$ini_ddt_end DRIVER$INI_DDT_END #define driver$ini_dpt_adapt DRIVER$INI_DPT_ADAPT #define driver$ini_dpt_bt_order DRIVER$INI_DPT_BT_ORDER #define driver$ini_dpt_decode DRIVER$INI_DPT_DECODE #define driver$ini_dpt_defunits DRIVER$INI_DPT_DEFUNITS #define driver$ini_dpt_deliver DRIVER$INI_DPT_DELIVER #define driver$ini_dpt_devpath_size DRIVER$INI_DPT_DEVPATH_SIZE #define driver$ini_dpt_devpath_ucb_ofs DRIVER$INI_DPT_DEVPATH_UCB_OFS #define driver$ini_dpt_dsplypath_size DRIVER$INI_DPT_DSPLYPATH_SIZE #define driver$ini_dpt_dsplypath_ucb_of DRIVER$INI_DPT_DSPLYPATH_UCB_OF #define driver$ini_dpt_flags DRIVER$INI_DPT_FLAGS #define driver$ini_dpt_idb_crams DRIVER$INI_DPT_IDB_CRAMS #define driver$ini_dpt_iohandles DRIVER$INI_DPT_IOHANDLES #define driver$ini_dpt_maxunits DRIVER$INI_DPT_MAXUNITS #define driver$ini_dpt_max_unit DRIVER$INI_DPT_MAX_UNIT #define driver$ini_dpt_mpdev_path_swtch DRIVER$INI_DPT_MPDEV_PATH_SWTCH #define driver$ini_dpt_name DRIVER$INI_DPT_NAME #define driver$ini_dpt_struc_init DRIVER$INI_DPT_STRUC_INIT #define driver$ini_dpt_struc_reinit DRIVER$INI_DPT_STRUC_REINIT #define driver$ini_dpt_ucb_crams DRIVER$INI_DPT_UCB_CRAMS #define driver$ini_dpt_ucbsize DRIVER$INI_DPT_UCBSIZE #define driver$ini_dpt_unload DRIVER$INI_DPT_UNLOAD #define driver$ini_dpt_vector DRIVER$INI_DPT_VECTOR #define driver$ini_dpt_end DRIVER$INI_DPT_END #define driver$ini_fdt_act DRIVER$INI_FDT_ACT #define driver$ini_fdt_qsrv DRIVER$INI_FDT_QSRV #define driver$ini_fdt_end DRIVER$INI_FDT_END /* Device driver table initialization * Declare initialization function prototypes */ int driver$ini_ddt_altstart( DDT *ddt, void (*func)() ); int driver$ini_ddt_aux_routine( DDT *ddt, int ( *func )() ); int driver$ini_ddt_aux_storage( DDT *ddt, void *addr ); int driver$ini_ddt_cancel( DDT *ddt, void ( *func )() ); int driver$ini_ddt_cancel_selective( DDT *ddt, int ( *func )() ); int driver$ini_ddt_change_preferred( DDT *ddt, int ( *func )() ); int driver$ini_ddt_channel_assign( DDT *ddt, void ( *func )() ); int driver$ini_ddt_cloneducb( DDT *ddt, int ( *func )() ); int driver$ini_ddt_configure( DDT *ddt, int ( *func )() ); int driver$ini_ddt_ctrlinit( DDT *ddt, int ( *func )() ); int driver$ini_ddt_csr_mapping( DDT *ddt, int ( *func )() ); int driver$ini_ddt_deconfigure( DDT *ddt, int ( *func )() ); int driver$ini_ddt_diagbf( DDT *ddt, unsigned short value ); int driver$ini_ddt_erlgbf( DDT *ddt, unsigned short value ); int driver$ini_ddt_fast_fdt( DDT *ddt, int ( *func )() ); int driver$ini_ddt_functab( DDT *ddt, FDT *fdt ); int driver$ini_ddt_kp_reg_mask( DDT *ddt, unsigned long value ); int driver$ini_ddt_kp_stack_size( DDT *ddt, unsigned long value ); int driver$ini_ddt_kp_startio( DDT *ddt, void ( *func )() ); int driver$ini_ddt_make_devpath( DDT *ddt, int ( *func )() ); int driver$ini_ddt_mntv_for( DDT *ddt, int ( *func )() ); int driver$ini_ddt_mntver( DDT *ddt, void ( *func )() ); int driver$ini_ddt_mpdev_path_swtch( DDT *ddt, int ( *func )() ); int driver$ini_ddt_pending_io( DDT *ddt, int ( *func )() ); int driver$ini_ddt_qsrv_helper( DDT *ddt, int ( *func )() ); int driver$ini_ddt_qsrv_evnt_notify( DDT *ddt, int ( *func )() ); int driver$ini_ddt_mgt_register( DDT *ddt, int ( *func )() ); int driver$ini_ddt_mgt_deregister( DDT *ddt, int ( *func )() ); int driver$ini_ddt_regdmp( DDT *ddt, void ( *func )() ); int driver$ini_ddt_setprfpath( DDT *ddt, int ( *func )() ); int driver$ini_ddt_start( DDT *ddt, void ( *func )() ); int driver$ini_ddt_unitinit( DDT *ddt, int ( *func )() ); int driver$ini_ddt_end( DDT *ddt ); int driver$ini_dpt_adapt( DPT *dpt, unsigned long value ); int driver$ini_dpt_bt_order( DPT *dpt, long value ); int driver$ini_dpt_decode( DPT *dpt, long value ); int driver$ini_dpt_defunits( DPT *dpt, unsigned short value ); int driver$ini_dpt_deliver( DPT *dpt, int ( *func )() ); int driver$ini_dpt_devpath_size( DPT *dpt, unsigned long value ); int driver$ini_dpt_devpath_ucb_ofs( DPT *dpt, unsigned long value ); int driver$ini_dpt_dsplypath_size( DPT *dpt, unsigned long value ); int driver$ini_dpt_dsplypath_ucb_of( DPT *dpt, unsigned long value ); int driver$ini_dpt_flags( DPT *dpt, unsigned long value ); int driver$ini_dpt_idb_crams( DPT *dpt, unsigned short value ); int driver$ini_dpt_iohandles( DPT *dpt, unsigned short value ); int driver$ini_dpt_maxunits( DPT *dpt, unsigned short value ); int driver$ini_dpt_max_unit( DPT *dpt, unsigned long value ); int driver$ini_dpt_name( DPT *dpt, char *string_ptr ); int driver$ini_dpt_struc_init( DPT *dpt, void ( *func )() ); int driver$ini_dpt_struc_reinit( DPT *dpt, void ( *func )() ); int driver$ini_dpt_ucb_crams( DPT *dpt, unsigned short value ); int driver$ini_dpt_ucbsize( DPT *dpt, unsigned short value ); int driver$ini_dpt_unload( DPT *dpt, int ( *func )() ); int driver$ini_dpt_vector( DPT *dpt, void( **func )() ); int driver$ini_dpt_end( DPT *dpt ); int driver$ini_fdt_act( FDT *fdt, unsigned long iofunc, int ( *action )(), unsigned long buf_64_flags ); int driver$ini_fdt_qsrv( FDT *fdt, unsigned long iofunc, int qsrv_mask ); int driver$ini_fdt_end( FDT *fdt ); /* Device driver table initialization * Define symbols that should be used for the buf_64_flags parameter passed to * the driver$ini_fdt_act() macro. The buf_64_flags parameter specifies * whether the function is "buffered" or "direct" as well as if the function * supports a 64-bit $QIO P1 parameter value. */ #define FDT_BUFFERED 1 #define FDT_NOT_BUFFERED 0 #define FDT_DIRECT 0 #define __FDT_64 2 #define FDT_BUFFERED_64 (FDT_BUFFERED | __FDT_64) #define FDT_NOT_BUFFERED_64 (FDT_NOT_BUFFERED | __FDT_64) #define FDT_DIRECT_64 (FDT_DIRECT | __FDT_64) /* Device driver table initialization * Define macros corresponding to each of the driver table * initialization functions that invoke the function and continue * if it returns success status; else, return the error status. */ #define ini_ddt_altstart( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_altstart( ddt, func ))) return _status; } #define ini_ddt_aux_routine( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_aux_routine( ddt, func ))) return _status; } #define ini_ddt_aux_storage( ddt, addr ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_aux_storage( ddt, addr ))) return _status; } #define ini_ddt_cancel( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_cancel( ddt, func ))) return _status; } #define ini_ddt_cancel_selective( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_cancel_selective( ddt, func ))) return _status; } #define ini_ddt_change_preferred( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_change_preferred( ddt, func ))) return _status; } #define ini_ddt_channel_assign( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_channel_assign( ddt, func ))) return _status; } #define ini_ddt_cloneducb( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_cloneducb( ddt, func ))) return _status; } #define ini_ddt_configure( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_configure( ddt, func ))) return _status; } #define ini_ddt_ctrlinit( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_ctrlinit( ddt, func ))) return _status; } #define ini_ddt_csr_mapping( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_csr_mapping( ddt, func ))) return _status; } #define ini_ddt_deconfigure( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_deconfigure( ddt, func ))) return _status; } #define ini_ddt_diagbf( ddt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_diagbf( ddt, value ))) return _status; } #define ini_ddt_erlgbf( ddt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_erlgbf( ddt, value ))) return _status; } #define ini_ddt_fast_fdt( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_fast_fdt( ddt, func ))) return _status; } #define ini_ddt_functab( ddt, fdt ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_functab( ddt, fdt ))) return _status; } #define ini_ddt_kp_reg_mask( ddt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_kp_reg_mask( ddt, value ))) return _status; } #define ini_ddt_kp_stack_size( ddt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_kp_stack_size( ddt, value ))) return _status; } #define ini_ddt_kp_startio( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_kp_startio( ddt, func ))) return _status; } #define ini_ddt_make_devpath( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_make_devpath( ddt, func ))) return _status; } #define ini_ddt_mntv_for( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_mntv_for( ddt, func ))) return _status; } #define ini_ddt_mntver( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_mntver( ddt, func ))) return _status; } #define ini_ddt_mpdev_path_swtch( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_mpdev_path_swtch( ddt, func ))) return _status; } #define ini_ddt_pending_io( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_pending_io( ddt, func ))) return _status; } #define ini_ddt_qsrv_helper( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_qsrv_helper( ddt, func ))) return _status; } #define ini_ddt_qsrv_evnt_notify( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_qsrv_evnt_notify( ddt, func ))) return _status; } #define ini_ddt_mgt_register( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_mgt_register( ddt, func ))) return _status; } #define ini_ddt_mgt_deregister( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_mgt_deregister( ddt, func ))) return _status; } #define ini_ddt_regdmp( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_regdmp( ddt, func ))) return _status; } #define ini_ddt_setprfpath( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_setprfpath( ddt, func ))) return _status; } #define ini_ddt_start( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_start( ddt, func ))) return _status; } #define ini_ddt_unitinit( ddt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_unitinit( ddt, func ))) return _status; } #define ini_ddt_end( ddt ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_ddt_end( ddt ))) return _status; } #define ini_dpt_adapt( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_adapt( dpt, value ))) return _status; } #define ini_dpt_bt_order( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_bt_order( dpt, value ))) return _status; } #define ini_dpt_decode( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_decode( dpt, value ))) return _status; } #define ini_dpt_defunits( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_defunits( dpt, value ))) return _status; } #define ini_dpt_deliver( dpt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_deliver( dpt, func ))) return _status; } #define ini_dpt_devpath_size( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_devpath_size( dpt, value ))) return _status; } #define ini_dpt_devpath_ucb_ofs( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_devpath_ucb_ofs( dpt, value ))) return _status; } #define ini_dpt_flags( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_flags( dpt, value ))) return _status; } #define ini_dpt_idb_crams( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_idb_crams( dpt, value ))) return _status; } #define ini_dpt_iohandles( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_iohandles( dpt, value ))) return _status; } #define ini_dpt_maxunits( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_maxunits( dpt, value ))) return _status; } #define ini_dpt_max_unit( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_max_unit( dpt, value ))) return _status; } #define ini_dpt_name( dpt, string_ptr ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_name( dpt, string_ptr ))) return _status; } #define ini_dpt_struc_init( dpt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_struc_init( dpt, func ))) return _status; } #define ini_dpt_struc_reinit( dpt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_struc_reinit( dpt, func ))) return _status; } #define ini_dpt_ucb_crams( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_ucb_crams( dpt, value ))) return _status; } #define ini_dpt_ucbsize( dpt, value ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_ucbsize( dpt, value ))) return _status; } #define ini_dpt_unload( dpt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_unload( dpt, func ))) return _status; } #define ini_dpt_vector( dpt, func ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_vector( dpt, func ))) return _status; } #define ini_dpt_end( dpt ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_dpt_end( dpt ))) return _status; } #define ini_fdt_act( fdt, func, action, buf_64_flags ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_fdt_act( fdt, func, action, FDT_##buf_64_flags ))) return _status; } #define ini_fdt_qsrv( fdt, func, qsrv_mask ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_fdt_qsrv( fdt, func, qsrv_mask ))) return _status; } #define ini_fdt_end( fdt ) { \ int _status; \ if( !$VMS_STATUS_SUCCESS( _status = driver$ini_fdt_end( fdt ))) return _status; } #endif /* __VMS_DRIVERS_LOADED */