#ifdef public_domain_notice Copyright (c) 1996 David P. Murphy for Datametrics Systems Corporation --- please send all comments and bug reports to murphy@connor.datametrics.com Permission is granted to any individual or institution to use, copy, or redistribute this software so long as all of the original files are included, that it is not sold for profit, and that this copyright notice is retained. Use at your own risk. Neither Murphy nor Datametrics assumes responsibility. Do not taunt Happy Fun Ball. #endif /* this module is based upon the file SYS$EXAMPLES:UWSS.C */ /* To make things easy, the number and name of the user-written system * services must be known at compile time. So first define the number * of services (kernel and exec) and allocate the routine lists, which * in C-language terms are arrays of pointers to functions returning * ints. */ #include /* macros specific to this module */ #ifndef NULL #define NULL ((void *) 0) #endif /* internal data structures */ typedef unsigned long CONDVAL; /* operating-system function declarations */ /* external function declarations */ extern CONDVAL MH_GetChannelInfo(); extern CONDVAL MH_GetLockInfo(); extern CONDVAL MH_GetTimerInfo(); /* internal function declarations */ /* external data declarations */ /* internal data declarations */ #define rundown_handler NULL static CONDVAL (*(kernel_table[]))() = { MH_GetLockInfo }; static CONDVAL (*(exec_table[]))() = { MH_GetChannelInfo, MH_GetTimerInfo }; #define KERNEL_ROUTINE_COUNT (sizeof(kernel_table) / sizeof(kernel_table[0])) #define EXEC_ROUTINE_COUNT (sizeof(exec_table) / sizeof(exec_table[0])) /* Now build and initialize the PLV structure. Since the PLV must have * the VEC psect attribute, and must be the first thing in that psect, * we use the strict external ref-def model which allows us to put the * PLV structure in its own psect. This is like the globaldef * extension in VAX C, where you can specify in what psect a global * symbol may be found; unlike globaldef, it allows the declaration * itself to be ANSI-compliant. Note that the initialization here * relies on the change-mode-specific portion (plv$r_cmod_data) of the * PLV being declared before the portions of the PLV which are specific * to message vector PLVs (plv$r_msg_data) and system service intercept * PLVs (plv$r_ssi_data). */ #ifdef __ALPHA #pragma extern_model save #pragma extern_model strict_refdef "USER_SERVICES" #endif extern const PLV user_services = { PLV$C_TYP_CMOD, /* type */ 0, /* version */ { { KERNEL_ROUTINE_COUNT, /* # of kernel routines */ EXEC_ROUTINE_COUNT, /* # of exec routines */ kernel_table, /* kernel routine list */ exec_table, /* exec routine list */ rundown_handler, /* kernel rundown handler */ rundown_handler, /* exec rundown handler */ NULL, /* no RMS dispatcher */ NULL, /* kernel routine flags vector */ NULL /* exec routine flags vector */ } } }; #ifdef __ALPHA #pragma extern_model restore #endif void MikesStub( void ) { return; }