File: gtm_c_stack_trace_semop.h

package info (click to toggle)
fis-gtm 7.1-006-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 32,908 kB
  • sloc: ansic: 344,906; asm: 5,184; csh: 4,859; sh: 2,000; awk: 294; makefile: 73; sed: 13
file content (46 lines) | stat: -rw-r--r-- 1,736 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/****************************************************************
 *								*
 * Copyright (c) 2011-2016 Fidelity National Information	*
 * Services, Inc. and/or its subsidiaries. All rights reserved.	*
 *								*
 *	This source code contains the intellectual property	*
 *	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.	*
 *								*
 ****************************************************************/

#ifndef GTM_C_STACK_TRACE_SEMOP_INCLUDED
#define GTM_C_STACK_TRACE_SEMOP_INCLUDED
#include <sys/sem.h>
#include "semwt2long_handler.h"

#ifdef DEBUG
#include "gdsroot.h"		/* needed for gdsfhead.h */
#include "gtm_facility.h"	/* needed for gdsfhead.h */
#include "gdskill.h"		/* needed for gdsfhead.h */
#include "fileinfo.h"		/* needed for gdsfhead.h */
#include "gdsbt.h"		/* needed for gdsfhead.h */
#include "gdsblk.h"		/* needed for gdsfhead.h */
#include "gdsfhead.h"		/* needed for gtm_semutils.h */
#include "gtm_semutils.h"
#include "wbox_test_init.h"
#define CHECK_SEMVAL_GRT_SEMOP(SEMID, SEMNUM, SEM_OP)								\
{														\
	int sems_val;												\
	if (0 > (SEM_OP))											\
	{													\
		sems_val = semctl(SEMID, SEMNUM, GETVAL);							\
		if (-1 != sems_val)										\
			assert((sems_val >= abs(SEM_OP)) || (gtm_white_box_test_case_enabled &&			\
				(WBTEST_MUR_ABNORMAL_EXIT_EXPECTED == gtm_white_box_test_case_number)));	\
	}													\
}
#else
#define CHECK_SEMVAL_GRT_SEMOP(SEMID, SEMNUM, SEMOP) {}
#endif

#define MAX_SEM_WAIT_TIME (1000 * 60) /* 60 seconds */
int try_semop_get_c_stack(int semid, struct sembuf sops[], int nsops);

#endif /*GTM_C_STACK_TRACE_SEMOP_INCLUDED*/