Allocates an OpenVMS Galaxy lock block from a lock table created with the $CREATE_GALAXY_LOCK_TABLE service. Note that this system service is supported only in an OpenVMS Alpha Galaxy environment. For more information about programming with OpenVMS Galaxy system services, see the VSI OpenVMS Alpha Partitioning and Galaxy Guide. Format SYS$CREATE_GALAXY_LOCK lcktbl_handle ,name ,size ,timeout ,ipl ,rank ,handle C Prototype int sys$create_galaxy_lock (unsigned int lcktbl_handle, void *name, unsigned int size, unsigned int timeout, unsigned int ipl, unsigned int rank, unsigned __int64 *lock_handle);
1 – Arguments
lcktbl_handle OpenVMS usage:lock table handle type: longword (unsigned) access: read mechanism: input by value The 32-bit lock table handle that identifies the lock table in which to create the lock. This value is returned by SYS$CREATE_ GALAXY_LOCK_TABLE. name OpenVMS usage:address type: ASCID string access: read mechanism: input by reference The name parameter is a pointer to an ASCID string (passed by descriptor). The name can be a maximum of 15 characters. Lock names are not checked for uniqueness; therefore, multiple locks can be created with the same name. timeout OpenVMS usage:wait timeout type: longword (unsigned) access: read mechanism: input by value The 32-bit wait or spin timeout specified in 10 microsecond units. If not specified, the timeout defaults to 10 microseconds. size OpenVMS usage:byte count type: longword (unsigned) access: read mechanism: input by value The size of the galaxy lock in bytes. Galaxy locks have two legal sizes. These values are returned by SYS$GET_GALAXY_LOCK_SIZE. The value passed to SYS$CREATE_GALAXY_LOCK must be equal to the value passed to the call to SYS$CREATE_GALAXY_LOCK_TABLE. ipl OpenVMS usage:IPL of lock type: longword (unsigned) access: read mechanism: input by value For galaxy locks acquired in kernel mode, the IPL to raise to while the lock is held. This parameter is ignored for all other access mode. rank OpenVMS usage:rank of lock type: longword (unsigned) access: read mechanism: input by value Rank applied to a galaxy lock. Ranking is used to detect potential deadlocks. This parameter is currently ignored. handle OpenVMS usage:address type: quadword (unsigned) access: write mechanism: output by reference The handle parameter is a pointer to a quadword. The value returned is a 64-bit handle that uniquely identifies the lock galaxy-wide.