/* * ************************************************************************* * * * © Copyright 2007 Hewlett-Packard Development Company, L.P. * * * * Confidential computer software. Valid license from HP and/or * * its subsidiaries 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. * * * * Neither HP nor any of its subsidiaries shall be liable for technical * * or editorial errors or omissions contained herein. The information * * in this document is provided "as is" without warranty of any kind and * * is subject to change without notice. The warranties for HP products * * are set forth in the express limited warranty statements accompanying * * such products. Nothing herein should be construed as constituting an * * additional warranty. * * * ************************************************************************* * *++ * * FACILITY: * * VMS Executive (LIB_H) * * ABSTRACT: * * This module contains the C function prototypes for the VMS system * routines that begin with the SMP$ and SMP_STD$ prefixes and have * a standard call interface. * * NOTE: * * The conventions used in these function prototypes are: * * 1. Case * This header file supports invoking the routines by either using all * lowercase or all uppercase names for the system routines. Either * naming convention works even in the presence of the /NAME=AS_IS * compiler switch. * * 2. Integer size * The generic "int" type is used where it doesn't matter whether the * integer is 32 or 64 bits wide. Thus "int" is the returned value of * most functions and is the type for most integers passed by value. * However, an unambiguous integer type, e.g. int32, is used for any * integer that is passed by reference. Also, int64 is used for any * integer that is expected to be 64 bits wide even if it is passed by * value. * * 3. Types * The function prototypes use the types defined in [SYSLIB]SYS$LIB_C.TLB. * The definitions of all types used are included below. * * 4. Parameter names * Parameter names are used in the prototypes. Although they are ignored * by the compiler they do provide useful documentation. For example: * * void ioc_std$reqcom (int iost1, int iost2, UCB *ucb); * * is used instead of the functionally equivalent: * * void ioc_std$reqcom (int, int, UCB *); * * 5. Parameters passed by reference * The parameter name includes the "_p" suffix if the parameter is passed * by reference unless the parameter type implies that it is always passed * by reference. For example, there is no "_p" suffix in: * * UCB *ucb; * int32 iosb[2]; * * since structures and arrays are always passed by reference. However: * * int32 *outlen_p; * UCB **new_ucb_p; * * include the suffix to denote that outlen_p is a pointer to a 32 bit * integer, and to denote that new_ucb_p is a pointer to a pointer to a * UCB structure. * * * AUTHOR: * * Leonard S. Szubowicz * * CREATION DATE: 6-Jun-1993 * * MODIFICATION HISTORY: * * X-14 RAB Richard A. Bishop 31-Oct-2007 * Add SMP$REMOVE_SPINLOCK * * X-13 RAB Richard A. Bishop 27-May-2003 * Remove local declarations for SPL$S_NAME and _spl, * as they are included in SPLDEF. * * X-12 CJ Charles Jaojaroenkul 17-Jul-2002 * Add prototype declarations for new spinlock manipulation * functions smp$create_spinlock() and smp$name_spinlock(). * * X-11 JRK393 Jim Kauffman 26-Jul-2001 * Add support for CPU hot-add * * X-10 TJP Tom Provost 15-OCT-1999 * Add prototype for allocate portlock routine * * X-9 CMOS Christian Moser 16-AUG-1999 * Add prototypes for sharelock and nospin locking routines. * * X-8 JRK390 Jim Kauffman 27-Aug-1998 * Fix naming of IOSBDEF header file * * X-7 JRK390 Jim Kauffman 22-Jun-1998 * Fix parameters to smp$validate_hw_configuration * * X-6 KLN2082 Karen L. Noel 04-Jun-1998 * Surround this file with short pointer pragmas in case someone * wants to compile with long pointers from the command line. * * X-5 JRK390 Jim Kauffman 10-Apr-1998 * Remove smp$allocate_ctd * * X-4 JRK390 Jim Kauffman 3-Apr-1998 * Add CPU migration and communication routines * * X-3 JRK390 Jim Kauffman 12-Mar-1998 * Add potential set validation routines * * X-2 JRK390 Jim Kauffman 13-Feb-1998 * Extra routines used for config tree and Galaxy * * X-1 LSS0279 Leonard S. Szubowicz 6-Jun-1993 * Initial version containing only those routines commonly used * by device drivers. * *-- */ #ifndef __SMP_ROUTINES_LOADED #define __SMP_ROUTINES_LOADED 1 #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif /* * Define all types that are used in the following function prototypes. */ #include #include #include /* VMS system routine entry points are defined externally using uppercase names. The following macros allow the usage of the lowercase versions of these names even in the presence of the /NAME=AS_IS compiler switch. */ #define smp_std$acqnoipl SMP_STD$ACQNOIPL #define smp_std$acquire SMP_STD$ACQUIRE #define smp_std$acquirel SMP_STD$ACQUIREL #define smp_std$acqnoipl_shr SMP_STD$ACQNOIPL_SHR #define smp_std$acquire_shr SMP_STD$ACQUIRE_SHR #define smp_std$acquirel_shr SMP_STD$ACQUIREL_SHR #define smp_std$acqnoipl_nospin SMP_STD$ACQNOIPL_NOSPIN #define smp_std$acquire_nospin SMP_STD$ACQUIRE_NOSPIN #define smp_std$acquirel_nospin SMP_STD$ACQUIREL_NOSPIN #define smp_std$acqnoipl_shr_nospin SMP_STD$ACQNOIPL_SHR_NOSPIN #define smp_std$acquire_shr_nospin SMP_STD$ACQUIRE_SHR_NOSPIN #define smp_std$acquirel_shr_nospin SMP_STD$ACQUIREL_SHR_NOSPIN #define smp_std$allocate_portlock SMP_STD$ALLOCATE_PORTLOCK #define smp_std$cvt_to_shared SMP_STD$CVT_TO_SHARED #define smp_std$cvt_to_ex SMP_STD$CVT_TO_EX #define smp_std$release SMP_STD$RELEASE #define smp_std$releasel SMP_STD$RELEASEL #define smp_std$restore SMP_STD$RESTORE #define smp_std$restorel SMP_STD$RESTOREL #define smp_std$release_shr SMP_STD$RELEASE_SHR #define smp_std$releasel_shr SMP_STD$RELEASEL_SHR #define smp_std$restore_shr SMP_STD$RESTORE_SHR #define smp_std$restorel_shr SMP_STD$RESTOREL_SHR #define smp_std$setup_cpu SMP_STD$SETUP_CPU #define smp$cpu_orphan_check SMP$CPU_ORPHAN_CHECK #define smp$request_shutdown_cpu SMP$REQUEST_SHUTDOWN_CPU #define smp$system_event_notify SMP$SYSTEM_EVENT_NOTIFY #define smp$timeout SMP$TIMEOUT #define smp$validate_hw_configuration SMP$VALIDATE_HW_CONFIGURATION /* Function prototypes for system routines with the SMP$ and SMP_STD$ prefix. */ void smp_std$acqnoipl (SPL *spl); void smp_std$acquire (int spl_index); void smp_std$acquirel (SPL *spl); int smp_std$acqnoipl_nospin (SPL *spl); int smp_std$acquire_nospin (int spl_index); int smp_std$acquirel_nospin (SPL *spl); void smp_std$acqnoipl_shr (SPL *spl); void smp_std$acquire_shr (int spl_index); void smp_std$acquirel_shr (SPL *spl); int smp_std$acqnoipl_shr_nospin (SPL *spl); int smp_std$acquire_shr_nospin (int spl_index); int smp_std$acquirel_shr_nospin (SPL *spl); int smp_std$allocate_portlock (int spl_index, SPL **portlock_ptr); void smp_std$cvt_to_shared (SPL *spl); int smp_std$cvt_to_ex (SPL *spl); void smp_std$release (int spl_index); void smp_std$releasel (SPL *spl); void smp_std$restore (int spl_index); void smp_std$restorel (SPL *spl); void smp_std$release_shr (int spl_index); void smp_std$releasel_shr (SPL *spl); void smp_std$restore_shr (int spl_index); void smp_std$restorel_shr (SPL *spl); int smp_std$setup_cpu(int, CTD_PQ); int smp$cpu_orphan_check(int,uint64,uint64); int smp$request_shutdown_cpu(int, int); int smp$system_event_notify(CTD_PQ ctd, int event); void smp$timeout (void); int smp$validate_hw_configuration(int, char **, char **); int smp$create_spinlock (SPL **spladdr, unsigned int flags, unsigned int ipl, char lockname[]); int smp$name_spinlock (SPL *spladdr, char lockname[]); void smp$remove_spinlock (SPL *spladdr); #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #endif /* __SMP_ROUTINES_LOADED */