亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? printv3s4.c

?? 了解服務器的內部結構
?? C
字號:
/*
 *	PROGRAM:	JRD Lock Manager
 *	MODULE:		printv3s4.c
 *	DESCRIPTION:	Version 3 Sun 4 lock Table printer
 *
 * The contents of this file are subject to the Interbase Public
 * License Version 1.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy
 * of the License at http://www.Inprise.com/IPL.html
 *
 * Software distributed under the License is distributed on an
 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * rights and limitations under the License.
 *
 * The Original Code was created by Inprise Corporation
 * and its predecessors. Portions created by Inprise Corporation are
 * Copyright (C) Inprise Corporation.
 *
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 */

#include "../jrd/ib_stdio.h"
#include "../lock/lockv3s4.h"
#include "../lock/prtv3_proto.h"

#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif

#include <sys/param.h>
#include <sys/stat.h>

static USHORT	sw_requests, sw_processes, sw_locks, sw_series, sw_history,
		sw_mutex;

static LHB	LOCK_header;
static long	LOCK_size_mapped;
static 		LOCK_fd;

#define default_size	8192
#define hash_slots	101

static TEXT	*history_names[] = {
	"n/a", "ENQ", "DEQ", "CONVERT", "SIGNAL", "POST", "WAIT",
	"DEL_PROC", "DEL_LOCK", "DEL_REQ", "DENY", "GRANT", "LEAVE",
	"SCAN", "DEAD", "ENTER", "CLEANUP", "BUG", "ACTIVE"
	};


static UCHAR	compatibility[] = {

/*				Shared	Prot	Shared	Prot
		none	null	 Read	Read	Write	Write	Exclusive */

/* none */	1,	  1,	   1,	  1,	  1,	  1,	  1,
/* null */	1,	  1,	   1,	  1,	  1,	  1,	  1,
/* SR */	1,	  1,	   1,     1,	  1,	  1,	  0,
/* PR */	1,	  1,	   1,	  1,	  0,	  0,	  0,
/* SW */	1,	  1,	   1,	  0,	  1,	  0,	  0,
/* PW */	1,	  1,	   1,	  0,	  0,	  0,	  0,
/* EX */	1,	  1,	   0,	  0,	  0,	  0,	  0 };

#define COMPATIBLE(st1, st2)	compatibility [st1 * LCK_max + st2]

V3_lock_print (argc, argv)
    USHORT	argc;
    UCHAR	*argv[];
{
/**************************************
 *
 *	V 3 _ l o c k _ p r i n t
 *
 **************************************
 *
 * Functional description
 *	Print v3 lock table structure
 *
 **************************************/
USHORT		name_length, i;
long		start, length;
SHB		shb;
SRQ		que, slot;
PRB		process;
LBL		lock;
UCHAR		*p, c;
char		lock_file[MAXPATHLEN];
char		host_name[MAXHOSTNAMELEN];
struct stat	stat_buf;

/* Handle switches, etc. */

argv++;
sw_processes = TRUE;

while (--argc)
    {
    p = *argv++;
    while (c = *p++)
	switch (c)
	    {
	    case 'o':				/* Owners: compatible with v4 */
	    case 'p':
		sw_processes = TRUE;
		break;

	    case 'l':
		sw_locks = TRUE;
		break;

	    case 'r':
		sw_requests = TRUE;
		break;
	    
	    case 'a':
		sw_locks = TRUE;
		sw_processes = TRUE;
		sw_requests = TRUE;
		sw_history = TRUE;
		break;
	    
	    case 'h':
		sw_history = TRUE;
		break;

	    case 's':
		sw_series = atoi (*argv++);
		--argc;
		break;

	    case '-':
		break;

	    default:
		/* Silently ignore invalid options - 
		 *  the V4 option parser reported any appropriate error */
		break;
	    }
    }

/* Construct a node-specific filename of the form "gds.lockfile.<hostname>" */

if (gethostname (host_name, sizeof (host_name)))
    {
    ib_printf ("gethostname failed\n");
    return FAILURE;
    }

sprintf (lock_file, LOCK_FILE, host_name);

LOCK_fd = open (lock_file, O_RDWR, 0660);
if (LOCK_fd == -1)
    {
    /* Silently return - there doesn't have to be a bridge lock file */
    return FAILURE;
    }

if (stat (lock_file, &stat_buf))
    {
    ib_printf ("stat failed for bridge lock table %s\n", lock_file);
    return FAILURE;
    }

if (stat_buf.st_size < sizeof (struct lhb))
    {
    /* File is obviously too small to really be a lock file */
    ib_printf ("Bridge lock file too small: %s\n",
	     lock_file);
    return FAILURE;
    }

LOCK_size_mapped = DEFAULT_SIZE;
LOCK_header = (LHB) mmap (NULL, LOCK_size_mapped, PROT_READ | PROT_WRITE, MAP_SHARED, LOCK_fd, 0);

if ((int) LOCK_header == -1)
    {
    ib_printf ("mmap failed\n");
    return FAILURE;
    }

/* If the table is larger than usual, remap it */

if (LOCK_header->lhb_length > LOCK_size_mapped)
    {
    length = LOCK_header->lhb_length;
    LOCK_header = (LHB) mmap (NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, LOCK_fd, 0);
    }

/* Print lock header block */

ib_printf ("LOCK_HEADER BLOCK\n");
ib_printf ("\tVersion: %d, Active process: %d, Length: %d, Used: %d\n",
	LOCK_header->lhb_version, LOCK_header->lhb_active_process, 
	LOCK_header->lhb_length, LOCK_header->lhb_used);

ib_printf ("\tEnqs: %d, Converts: %d, Rejects: %d, Blocks: %d\n",
	LOCK_header->lhb_enqs, LOCK_header->lhb_converts,
	LOCK_header->lhb_denies, LOCK_header->lhb_blocks);

ib_printf ("\tDeadlock scans: %d, Deadlocks: %d\n",
	LOCK_header->lhb_scans, LOCK_header->lhb_deadlocks);

if (LOCK_header->lhb_secondary != LHB_PATTERN)
    {
    shb = (SHB) ABS_PTR (LOCK_header->lhb_secondary);
    ib_printf ("\tRemove node: %d, Insert queue: %d, Insert prior: %d\n",
	shb->shb_remove_node, shb->shb_insert_que, shb->shb_insert_prior);
    }

prt_que ("\tProcesses", &LOCK_header->lhb_processes);
prt_que ("\tFree processes", &LOCK_header->lhb_free_processes);
prt_que ("\tFree locks", &LOCK_header->lhb_free_locks);
prt_que ("\tFree requests", &LOCK_header->lhb_free_requests);
ib_printf ("\n");

/* Print known processes */

if (sw_processes)
    QUE_LOOP (LOCK_header->lhb_processes, que)
	prt_process ((UCHAR*) que - OFFSET (PRB, prb_lhb_processes));

/* Print known locks */

if (sw_locks || sw_series)
    for (slot = LOCK_header->lhb_hash, i = 0; i < LOCK_header->lhb_hash_slots; 
	    slot++, i++)
	for (que = (SRQ) ABS_PTR (slot->srq_forward); que != slot;
	     que = (SRQ) ABS_PTR (que->srq_forward))
	    prt_lock ((UCHAR*) que - OFFSET (LBL, lbl_lhb_hash));
    
if (sw_history)
    prt_history (LOCK_header->lhb_history, "History");

if (LOCK_header->lhb_secondary != LHB_PATTERN)
    prt_history (shb->shb_history, "Event log");

return SUCCESS;
}

static prt_history (history_header, title)
    PTR		history_header;
    char	*title;
{
/**************************************
 *
 *	p r t _ h i s t o r y
 *
 **************************************
 *
 * Functional description
 *	Print history list of lock table.
 *
 **************************************/
HIS	history;

ib_printf ("%s:\n", title);

for (history = (HIS) ABS_PTR (history_header); TRUE;
     history = (HIS) ABS_PTR (history->his_next))
    {
    if (history->his_operation)
	ib_printf ("    %s:\tprocess = %d, lock = %d, request = %d\n",
	    history_names [history->his_operation], 
	    history->his_process, history->his_lock, 
	    history->his_request);
    if (history->his_next == history_header)
	break;
    }
}

static prt_lock (lock)
    LBL		lock;
{
/**************************************
 *
 *	p r t _ l o c k
 *
 **************************************
 *
 * Functional description
 *	Print a formatted lock block 
 *
 **************************************/
long	key;
UCHAR	*p, *q, *end;
SRQ	que;
LRQ	request;

if (sw_series && lock->lbl_series != sw_series)
    return;

ib_printf ("LOCK BLOCK %d\n", REL_PTR (lock));
ib_printf ("\tSeries: %d, Parent: %d, State: %d, size: %d length: %d data: %d\n",
	lock->lbl_series, lock->lbl_parent, lock->lbl_state,
	lock->lbl_size, lock->lbl_length, lock->lbl_data);

if (LOCK_header->lhb_version >= LHB_VERSION5)
    q = lock->lbl_key5;
else
    q = lock->lbl_key3;
if (lock->lbl_length == 4)
    {
    p = (UCHAR*) &key;
    for (end = q + 4; q < end; q++)
	*p++ = *q;
    ib_printf ("\tKey: %d\n", key);
    }
else
    ib_printf ("\tKey: %.*s\n", lock->lbl_length, q);

prt_que ("\tHash que", &lock->lbl_lhb_hash);
prt_que ("\tRequests", &lock->lbl_requests);

QUE_LOOP (lock->lbl_requests, que)
    {
    request = (LRQ) ((UCHAR*) que - OFFSET (LRQ, lrq_lbl_requests));
    ib_printf ("\t\tRequest %d, Process: %d, State: %d (%d), Flags: %d\n",
	REL_PTR (request), request->lrq_process, request->lrq_state,
	request->lrq_requested, request->lrq_flags);
    }

ib_printf ("\n");
}

static prt_process (process)
    PRB		process;
{
/**************************************
 *
 *	p r t _ p r o c e s s
 *
 **************************************
 *
 * Functional description
 *	Print a formatted process block.
 *
 **************************************/
SRQ	que;

ib_printf ("PROCESS BLOCK %d\n", REL_PTR (process));
ib_printf ("\tProcess id: %d, flags: %d, pending: %d\n", 
    process->prb_process_id, process->prb_flags, process->prb_pending_request);

prt_que ("\tRequests", &process->prb_requests);
prt_que ("\tBlocks", &process->prb_blocks);
ib_printf ("\n");

if (sw_requests)
    QUE_LOOP (process->prb_requests, que)
	prt_request ((UCHAR*) que - OFFSET (LRQ, lrq_prb_requests));
}

static prt_request (request)
    LRQ		request;
{
/**************************************
 *
 *	p r t _ r e q u e s t
 *
 **************************************
 *
 * Functional description
 *	Print a format request block.
 *
 **************************************/

ib_printf ("REQUEST BLOCK %d\n", REL_PTR (request));
ib_printf ("\tProcess: %d, Lock: %d, State: %d, Mode: %d, Flags: %x\n",
	request->lrq_process, request->lrq_lock, request->lrq_state,
	request->lrq_requested, request->lrq_flags);
ib_printf ("\tAST: %x, argument: %x\n", request->lrq_ast_routine,
	request->lrq_ast_argument);
ib_printf ("\n");
}

static prt_que (string, que)
    UCHAR	*string;
    SRQ		que;
{
/**************************************
 *
 *	p r t _ q u e
 *
 **************************************
 *
 * Functional description
 *	Print the contents of a self-relative que.
 *
 **************************************/
long	count, offset;
SRQ	next;

offset = REL_PTR (que);

if (offset == que->srq_forward && offset == que->srq_backward)
    {
    ib_printf ("%s: *empty*\n", string);
    return;
    }

count = 0;

QUE_LOOP ((*que), next)
    ++count;

ib_printf ("%s (%ld):\tforward: %d, backward: %d\n", 
    string, count, que->srq_forward, que->srq_backward);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人高清免费观看| 久久久久99精品一区| 欧美不卡视频一区| 中文字幕在线观看不卡视频| 天天综合色天天| 成人99免费视频| 日韩免费观看2025年上映的电影| 亚洲欧美偷拍三级| 福利一区二区在线观看| 日韩美女一区二区三区| 午夜精品免费在线| 色婷婷综合久久久久中文| 久久久综合激的五月天| 久久精品久久精品| 欧美女孩性生活视频| 一区二区三区国产精品| 91在线高清观看| 中文字幕国产一区二区| 精品一区二区精品| 国产婷婷色一区二区三区四区| 一区二区三区四区激情| 99re成人精品视频| 国产精品乱码一区二区三区软件 | 国产精品一品视频| 欧美一级片免费看| 午夜精品福利久久久| 欧美一a一片一级一片| 亚洲一区在线视频观看| 欧美性极品少妇| 亚洲福中文字幕伊人影院| 色老头久久综合| 一区二区三区美女视频| 91久久精品一区二区三| 一区二区三区四区中文字幕| 91黄色免费网站| 亚洲一区二区三区四区在线免费观看 | 成人av免费在线观看| 国产亚洲人成网站| 成人丝袜视频网| 国产精品不卡视频| 91麻豆国产香蕉久久精品| 亚洲激情成人在线| 精品视频1区2区| 美女视频黄a大片欧美| 欧美videossexotv100| 国产综合色视频| 国产精品色眯眯| 在线观看亚洲a| 日韩精品一二三四| 国产亚洲午夜高清国产拍精品| 国产成人午夜视频| 亚洲精品午夜久久久| 欧美色综合网站| 伦理电影国产精品| 国产精品区一区二区三| 91福利视频在线| 免费的国产精品| 国产精品蜜臀av| 欧美日韩在线播| 国产一区二区三区视频在线播放| 中文字幕av资源一区| 欧美日韩激情一区二区三区| 国产尤物一区二区在线| 亚洲精品乱码久久久久久日本蜜臀| 欧美日韩不卡视频| 国产成人av电影| 午夜激情久久久| 国产日韩欧美麻豆| 欧美日韩第一区日日骚| 国产成a人亚洲精| 日韩中文字幕区一区有砖一区| 久久九九久精品国产免费直播| 色菇凉天天综合网| 国产精品一区久久久久| 亚州成人在线电影| 国产蜜臀97一区二区三区| 884aa四虎影成人精品一区| 成人av电影在线播放| 伦理电影国产精品| 亚洲成av人片一区二区梦乃| 中文字幕电影一区| 亚洲精品免费在线| 久久综合久色欧美综合狠狠| 日本高清不卡在线观看| 国产mv日韩mv欧美| 美女mm1313爽爽久久久蜜臀| 亚洲美女偷拍久久| 亚洲欧洲国产日韩| 久久久久国产精品厨房| 日韩免费高清视频| 欧美高清性hdvideosex| 91国偷自产一区二区三区成为亚洲经典| 激情成人综合网| 蜜桃久久av一区| 亚洲a一区二区| 亚洲一线二线三线久久久| 国产精品久久久久精k8| 2023国产一二三区日本精品2022| 7777精品伊人久久久大香线蕉经典版下载 | 中文天堂在线一区| 久久蜜桃av一区精品变态类天堂| 欧美一区二区免费| 欧美日韩精品福利| 欧美日韩免费在线视频| 色狠狠综合天天综合综合| 91在线国内视频| 99re在线精品| av一区二区不卡| 97久久精品人人做人人爽50路| 粉嫩一区二区三区性色av| 国产精品一区二区免费不卡 | 精品999久久久| 欧美成人高清电影在线| 7777精品伊人久久久大香线蕉超级流畅 | 91亚洲国产成人精品一区二三| 亚洲444eee在线观看| 午夜精品福利在线| 偷拍日韩校园综合在线| 亚洲成va人在线观看| 性感美女久久精品| 日韩有码一区二区三区| 婷婷夜色潮精品综合在线| 午夜欧美2019年伦理| 天天影视涩香欲综合网| 奇米精品一区二区三区四区 | 国产欧美一区二区三区沐欲| 2021中文字幕一区亚洲| 中文字幕欧美激情一区| 一区在线中文字幕| 一区二区三区在线视频观看58| 亚洲免费毛片网站| 午夜久久久影院| 美国十次了思思久久精品导航| 男人操女人的视频在线观看欧美| 麻豆视频一区二区| 国产91精品精华液一区二区三区| 成人午夜av在线| 欧美最猛性xxxxx直播| 日韩女优毛片在线| 国产精品久久久久久妇女6080| 一区二区三区四区高清精品免费观看| 天堂影院一区二区| 国模一区二区三区白浆| 99精品久久只有精品| 欧美在线观看一二区| 精品国产一二三区| 国产精品传媒入口麻豆| 丝袜美腿亚洲一区二区图片| 国产一区二区三区蝌蚪| 在线精品亚洲一区二区不卡| 日韩欧美一二三| 亚洲国产裸拍裸体视频在线观看乱了| 亚洲va韩国va欧美va精品| 国产精品一区一区| 555夜色666亚洲国产免| 国产喷白浆一区二区三区| 五月综合激情婷婷六月色窝| 国产精品白丝jk白祙喷水网站| 色哟哟在线观看一区二区三区| 亚洲精品在线网站| 亚洲成人动漫精品| 99国产精品国产精品久久| 日韩精品综合一本久道在线视频| 亚洲人成在线播放网站岛国| 欧美aaaaaa午夜精品| 欧美亚洲国产bt| 国产无一区二区| 美女视频黄a大片欧美| 欧美天堂一区二区三区| 国产精品日产欧美久久久久| 老汉av免费一区二区三区| 在线视频一区二区免费| 中文乱码免费一区二区| 久久99最新地址| 在线电影欧美成精品| 亚洲视频在线一区观看| 国产乱码精品一区二区三区忘忧草 | 蜜桃一区二区三区在线| 色婷婷av一区二区三区之一色屋| 亚洲国产精品成人久久综合一区| 久久99精品久久久久久动态图| 91蜜桃婷婷狠狠久久综合9色| 国产三级欧美三级日产三级99| 蜜臀久久久99精品久久久久久| 欧美日韩一级大片网址| 亚洲免费在线视频一区 二区| 国产成人精品亚洲午夜麻豆| 久久综合久久久久88| 美女尤物国产一区| 欧美一区二区三区不卡| 亚洲第一av色| 欧美视频在线播放| 亚洲18色成人| 欧美一区二区福利在线| 天堂成人免费av电影一区| 911精品产国品一二三产区| 亚洲va天堂va国产va久| 91精品在线观看入口| 免费观看在线色综合| 欧美成人一区二区三区|