Example #1
0
#include <rtnhdr.h>
#include "stack_frame.h"
#include "jobexam_process.h"
#ifdef UNIX
#  include "jobexam_signal_handler.h"
#endif
#include "send_msg.h"
#include "callg.h"
#include "zshow.h"
#include "util.h"
#include "mv_stent.h"

#define DEFAULT_DUMP_FILENAME "GTM_JOBEXAM.ZSHOW_DMP"
#define NOCONCEAL_OPTION "NO_CONCEAL"

static readonly mval empty_str_mval = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, 0, 0, 0, 0);
static readonly mval no_conceal_op  = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, SIZEOF(NOCONCEAL_OPTION) - 1,
							 NOCONCEAL_OPTION, 0, 0);
static unsigned char dumpable_error_dump_file_parms[2] = {iop_newversion, iop_eol};
static unsigned char dumpable_error_dump_file_noparms[1] = {iop_eol};
static unsigned int  jobexam_counter;

GBLREF uint4		process_id;
GBLREF io_pair		io_std_device, io_curr_device;
GBLREF mv_stent		*mv_chain;
GBLREF unsigned char    *msp, *stackwarn, *stacktop;
GBLREF boolean_t        created_core;
UNIX_ONLY(GBLREF sigset_t blockalrm;)
DEBUG_ONLY(GBLREF boolean_t ok_to_UNWIND_in_exit_handling;)

error_def(ERR_GTMASSERT);
Example #2
0
#include "gtmio.h"			/* for CLOSEFILE_RESET macro */

GBLREF	gd_region	*gv_cur_region;
GBLREF	uint4		dollar_tlevel;
GBLREF	gv_key		*gv_currkey;
GBLREF	unsigned int	t_tries;
#ifdef DEBUG
GBLREF	boolean_t	is_replicator;
GBLREF	boolean_t	donot_INVOKE_MUMTSTART;
#endif

error_def(ERR_TRIGUPBADLABEL);

#define LITERAL_TRIGJNLREC	"; ^#t physical upgrade from #LABEL 2,3 to #LABEL 4 (no logical change)"
#define	LITERAL_TRIGJNLREC_LEN	STR_LIT_LEN(LITERAL_TRIGJNLREC)
LITDEF mval literal_trigjnlrec	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX, 0, 0, LITERAL_TRIGJNLREC_LEN, (char *)LITERAL_TRIGJNLREC, 0, 0);	/* BYPASSOK */

LITREF	mval		literal_batch;
LITREF	mval		literal_curlabel;
LITREF	mval		literal_hashlabel;
LITREF	mval		literal_hashcycle;
LITREF	mval		literal_hashcount;
LITREF	mval		literal_hashtrhash;
#define TRIGGER_SUBSDEF(SUBSTYPE, SUBSNAME, LITMVALNAME, TRIGFILEQUAL, PARTOFHASH)	LITREF mval LITMVALNAME;
#include "trigger_subs_def.h"
#undef TRIGGER_SUBSDEF

DEFINE_NSB_CONDITION_HANDLER(trigger_upgrade_ch)

STATICFNDCL void	gvtr_set_hasht_gblsubs(mval *subs_mval, mval *set_mval);
STATICFNDCL void	gvtr_kill_hasht_gblsubs(mval *subs_mval, boolean_t killall);
Example #3
0
	FALSE,	/* MVST_STCK */
	TRUE,	/* MVST_NVAL */
	TRUE,	/* MVST_TVAL */
	TRUE,	/* MVST_TPHOLD */
	TRUE,	/* MVST_ZINTR */
	FALSE,	/* MVST_ZINTDEV */
	TRUE,	/* MVST_STCK_SP */
	TRUE,	/* MVST_LVAL */
	FALSE,	/* MVST_TRIGR */
	FALSE,	/* MVST_RSTRTPC */
	TRUE,	/* MVST_STORIG */
	FALSE	/* MVST_MRGZWRSV */
};

static readonly unsigned char localpool[7] = {'1', '1' , '1' , '0', '1', '0', '0'};
LITDEF mval literal_null	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT | MV_NUM_APPROX | MV_UTF_LEN, 0, 0, 0, 0, 0, 0);
LITDEF mval literal_zero	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 1, (char *)&localpool[3], 0,      0 );
LITDEF mval literal_one 	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 1, (char *)&localpool[0], 0,   1000 );
LITDEF mval literal_ten 	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 2, (char *)&localpool[2], 0,  10000 );
LITDEF mval literal_eleven	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 2, (char *)&localpool[0], 0,  11000 );
LITDEF mval literal_oneohoh	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[4], 0, 100000 );
LITDEF mval literal_oneohone	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[2], 0, 101000 );
LITDEF mval literal_oneten	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[1], 0, 110000 );
LITDEF mval literal_oneeleven	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[0], 0, 111000 );

/* --------------------------------------------------------------------------------------------------------------------------
 * All string mvals defined in this module using LITDEF need to have MV_NUM_APPROX bit set. This is because these mval
 * literals will most likely go into a read-only data segment of the executable and if ever they get passed into mval2subsc
 * (e.g. &literal_hashlabel is passed in gvtr_get_hasht_gblsubs using COPY_SUBS_TO_GVCURRKEY macro), it would otherwise
 * try to set the MV_NUM_APPROX bit and that could cause a SIG-11 since these mvals are in the read-only data segment.
 * --------------------------------------------------------------------------------------------------------------------------
Example #4
0
#include "gtm_utf8.h"

GBLREF int		(*op_open_ptr)(mval *v, mval *p, int t, mval *mspace);
GBLREF bool		mu_ctrlc_occurred;
GBLREF bool		mu_ctrly_occurred;
GBLREF spdesc		rts_stringpool, stringpool;
GBLREF gd_region	*gv_cur_region;
GBLREF sgmnt_data_ptr_t	cs_data;
GBLREF gd_addr		*gd_header;
GBLREF sgmnt_addrs	*cs_addrs;
GBLREF io_pair          io_curr_device;
GBLREF io_desc          *active_device;
GBLREF gv_namehead	*gv_target;
LITREF mstr		chset_names[];

LITDEF mval	mu_bin_datefmt	= DEFINE_MVAL_LITERAL(MV_STR, 0, 0, sizeof(BIN_HEADER_DATEFMT) - 1, BIN_HEADER_DATEFMT, 0, 0);

static readonly unsigned char	datefmt_txt[] = "DD-MON-YEAR  24:60:SS";
static readonly unsigned char	gt_lit[] = "TOTAL";
static readonly unsigned char	select_text[] = "SELECT";
static readonly mval		datefmt = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, sizeof(datefmt_txt) - 1, (char *)datefmt_txt, 0, 0);
static readonly mval		null_str = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, 0, 0, 0, 0);
static char			outfilename[256];
static unsigned short		filename_len;

#define	WRITE_NUMERIC(nmfield)						\
{									\
	MV_FORCE_MVAL(&val, nmfield);					\
	stringpool.free = stringpool.base;				\
	n2s(&val);							\
	if (val.mvtype & MV_NUM_APPROX)					\
Example #5
0
	TRUE,	/* MVST_TPHOLD */
	TRUE,	/* MVST_ZINTR */
	TRUE,	/* MVST_ZINTDEV */
	TRUE,	/* MVST_STCK_SP */
	TRUE,	/* MVST_LVAL */
	FALSE,	/* MVST_TRIGR */
	FALSE,	/* MVST_RSTRTPC */
	TRUE,	/* MVST_STORIG */
	FALSE	/* MVST_MRGZWRSV */
};

/* The address of this literal is assigned to mval pointers for arguments which are deliberately skipped in label invocations. */
LITDEF mval skiparg		= DEFINE_MVAL_COMMON(0, 0, 0, 0, 0, 0, 0, 0);

static readonly unsigned char localpool[7] = {'1', '1', '1', '0', '1', '0', '0'};
LITDEF mval literal_zero	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 1, (char *)&localpool[3], 0,   0);
LITDEF mval literal_one 	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 1, (char *)&localpool[0], 0,   1 * MV_BIAS);
LITDEF mval literal_ten 	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 2, (char *)&localpool[2], 0,  10 * MV_BIAS);
LITDEF mval literal_eleven	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 2, (char *)&localpool[0], 0,  11 * MV_BIAS);
LITDEF mval literal_oneohoh	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[4], 0, 100 * MV_BIAS);
LITDEF mval literal_oneohone	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[2], 0, 101 * MV_BIAS);
LITDEF mval literal_oneten	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[1], 0, 110 * MV_BIAS);
LITDEF mval literal_oneeleven	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, 3, (char *)&localpool[0], 0, 111 * MV_BIAS);

/* --------------------------------------------------------------------------------------------------------------------------
 * All string mvals defined in this module using LITDEF need to have MV_NUM_APPROX bit set. This is because these mval
 * literals will most likely go into a read-only data segment of the executable and if ever they get passed into mval2subsc
 * (e.g. &literal_hashlabel is passed in gvtr_get_hasht_gblsubs using COPY_SUBS_TO_GVCURRKEY macro), it would otherwise
 * try to set the MV_NUM_APPROX bit and that could cause a SIG-11 since these mvals are in the read-only data segment.
 * --------------------------------------------------------------------------------------------------------------------------
 */
Example #6
0
 *	of its copyright holder(s), and is made available	*
 *	under a license.  If you do not know the terms of	*
 *	the license, please stop and do not read further.	*
 *								*
 ****************************************************************/

#include "mdef.h"

#include "io.h"
#include "iottdef.h"
#include "io_params.h"

GBLREF io_pair io_curr_device;

static readonly unsigned char home_param_list[] =
{
	(unsigned char)iop_x,
	0, 0, 0, 0,
	(unsigned char)iop_y,
	0, 0, 0, 0,
	(unsigned char)iop_clearscreen,
	(unsigned char)iop_eol
};
static readonly mval home_params = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, sizeof(home_param_list) - 1, (char *)home_param_list, 0, 0);

void iott_wtff(void)
{
	io_curr_device.out->esc_state = START;
	iott_use(io_curr_device.out, &home_params);
}