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

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

?? tty_ioctl.c

?? linux 1.0 源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* *  linux/kernel/drivers/char/tty_ioctl.c * *  Copyright (C) 1991, 1992, 1993, 1994  Linus Torvalds * * Modified by Fred N. van Kempen, 01/29/93, to add line disciplines * which can be dynamically activated and de-activated by the line * discipline handling modules (like SLIP). */#include <linux/types.h>#include <linux/termios.h>#include <linux/errno.h>#include <linux/sched.h>#include <linux/config.h>#include <linux/kernel.h>#include <linux/major.h>#include <linux/tty.h>#include <linux/fcntl.h>#include <linux/string.h>#include <asm/io.h>#include <asm/bitops.h>#include <asm/segment.h>#include <asm/system.h>#undef	DEBUG#ifdef DEBUG# define	PRINTK(x)	printk (x)#else# define	PRINTK(x)	/**/#endifextern int session_of_pgrp(int pgrp);extern int do_screendump(int arg);extern int kill_pg(int pgrp, int sig, int priv);#ifdef CONFIG_SELECTIONextern int set_selection(const int arg);extern int paste_selection(struct tty_struct *tty);#endif /* CONFIG_SELECTION */static int tty_set_ldisc(struct tty_struct *tty, int ldisc);void flush_input(struct tty_struct * tty){	cli();	tty->read_q.head = tty->read_q.tail = 0;	tty->secondary.head = tty->secondary.tail = 0;	tty->canon_head = tty->canon_data = tty->erasing = 0;	memset(&tty->readq_flags, 0, sizeof tty->readq_flags);	memset(&tty->secondary_flags, 0, sizeof tty->secondary_flags);	sti();	if (!tty->link)		return;	/* No cli() since ptys don't use interrupts. */	tty->link->write_q.head = tty->link->write_q.tail = 0;	wake_up_interruptible(&tty->link->write_q.proc_list);	if (tty->link->packet) {		tty->ctrl_status |= TIOCPKT_FLUSHREAD;		wake_up_interruptible(&tty->link->secondary.proc_list);	}}void flush_output(struct tty_struct * tty){	cli();	tty->write_q.head = tty->write_q.tail = 0;	sti();	wake_up_interruptible(&tty->write_q.proc_list);	if (!tty->link)		return;	/* No cli() since ptys don't use interrupts. */	tty->link->read_q.head = tty->link->read_q.tail = 0;	tty->link->secondary.head = tty->link->secondary.tail = 0;	tty->link->canon_head = tty->link->canon_data = tty->link->erasing = 0;	memset(&tty->link->readq_flags, 0, sizeof tty->readq_flags);	memset(&tty->link->secondary_flags, 0, sizeof tty->secondary_flags);	if (tty->link->packet) {		tty->ctrl_status |= TIOCPKT_FLUSHWRITE;		wake_up_interruptible(&tty->link->secondary.proc_list);	}}void wait_until_sent(struct tty_struct * tty, int timeout){	struct wait_queue wait = { current, NULL };	TTY_WRITE_FLUSH(tty);	if (EMPTY(&tty->write_q))		return;	add_wait_queue(&tty->write_q.proc_list, &wait);	current->counter = 0;	/* make us low-priority */	if (timeout)		current->timeout = timeout + jiffies;	else		current->timeout = (unsigned) -1;	do {		current->state = TASK_INTERRUPTIBLE;		if (current->signal & ~current->blocked)			break;		TTY_WRITE_FLUSH(tty);		if (EMPTY(&tty->write_q))			break;		schedule();	} while (current->timeout);	current->state = TASK_RUNNING;	remove_wait_queue(&tty->write_q.proc_list, &wait);}static int do_get_ps_info(int arg){	struct tstruct {		int flag;		int present[NR_TASKS];		struct task_struct tasks[NR_TASKS];	};	struct tstruct *ts = (struct tstruct *)arg;	struct task_struct **p;	char *c, *d;	int i, n = 0;		i = verify_area(VERIFY_WRITE, (void *)arg, sizeof(struct tstruct));	if (i)		return i;	for (p = &FIRST_TASK ; p <= &LAST_TASK ; p++, n++)		if (*p)		{			c = (char *)(*p);			d = (char *)(ts->tasks+n);			for (i=0 ; i<sizeof(struct task_struct) ; i++)				put_fs_byte(*c++, d++);			put_fs_long(1, (unsigned long *)(ts->present+n));		}		else				put_fs_long(0, (unsigned long *)(ts->present+n));	return(0);			}static void unset_locked_termios(struct termios *termios,				 struct termios *old,				 struct termios *locked){	int	i;	#define NOSET_MASK(x,y,z) (x = ((x) & ~(z)) | ((y) & (z)))	if (!locked) {		printk("Warning?!? termios_locked is NULL.\n");		return;	}	NOSET_MASK(termios->c_iflag, old->c_iflag, locked->c_iflag);	NOSET_MASK(termios->c_oflag, old->c_oflag, locked->c_oflag);	NOSET_MASK(termios->c_cflag, old->c_cflag, locked->c_cflag);	NOSET_MASK(termios->c_lflag, old->c_lflag, locked->c_lflag);	termios->c_line = locked->c_line ? old->c_line : termios->c_line;	for (i=0; i < NCCS; i++)		termios->c_cc[i] = locked->c_cc[i] ?			old->c_cc[i] : termios->c_cc[i];}int check_change(struct tty_struct * tty, int channel){	/* If we try to set the state of terminal and we're not in the	   foreground, send a SIGTTOU.  If the signal is blocked or	   ignored, go ahead and perform the operation.  POSIX 7.2) */	if (current->tty != channel)		return 0;	if (tty->pgrp <= 0) {		printk("check_change: tty->pgrp <= 0!\n");		return 0;	}	if (current->pgrp == tty->pgrp)		return 0;	if (is_ignored(SIGTTOU))		return 0;	if (is_orphaned_pgrp(current->pgrp))		return -EIO;	(void) kill_pg(current->pgrp,SIGTTOU,1);	return -ERESTARTSYS;}static int set_termios_2(struct tty_struct * tty, struct termios * termios){	struct termios old_termios = *tty->termios;	int canon_change;	canon_change = (old_termios.c_lflag ^ termios->c_lflag) & ICANON;	cli();	*tty->termios = *termios;	if (canon_change) {		memset(&tty->secondary_flags, 0, sizeof tty->secondary_flags);		tty->canon_head = tty->secondary.tail;		tty->canon_data = 0;		tty->erasing = 0;	}	sti();	if (canon_change && !L_ICANON(tty) && !EMPTY(&tty->secondary))		/* Get characters left over from canonical mode. */		wake_up_interruptible(&tty->secondary.proc_list);	/* see if packet mode change of state */	if (tty->link && tty->link->packet) {		int old_flow = ((old_termios.c_iflag & IXON) &&				(old_termios.c_cc[VSTOP] == '\023') &&				(old_termios.c_cc[VSTART] == '\021'));		int new_flow = (I_IXON(tty) &&				STOP_CHAR(tty) == '\023' &&				START_CHAR(tty) == '\021');		if (old_flow != new_flow) {			tty->ctrl_status &= ~(TIOCPKT_DOSTOP | TIOCPKT_NOSTOP);			if (new_flow)				tty->ctrl_status |= TIOCPKT_DOSTOP;			else				tty->ctrl_status |= TIOCPKT_NOSTOP;			wake_up_interruptible(&tty->link->secondary.proc_list);		}	}	unset_locked_termios(tty->termios, &old_termios,			     termios_locked[tty->line]);	if (tty->set_termios)		(*tty->set_termios)(tty, &old_termios);	return 0;}static int set_termios(struct tty_struct * tty, struct termios * termios,		       int channel){	struct termios tmp_termios;	memcpy_fromfs(&tmp_termios, termios, sizeof (struct termios));	return set_termios_2(tty, &tmp_termios);}static int get_termio(struct tty_struct * tty, struct termio * termio){	int i;	struct termio tmp_termio;	i = verify_area(VERIFY_WRITE, termio, sizeof (struct termio));	if (i)		return i;	tmp_termio.c_iflag = tty->termios->c_iflag;	tmp_termio.c_oflag = tty->termios->c_oflag;	tmp_termio.c_cflag = tty->termios->c_cflag;	tmp_termio.c_lflag = tty->termios->c_lflag;	tmp_termio.c_line = tty->termios->c_line;	for(i=0 ; i < NCC ; i++)		tmp_termio.c_cc[i] = tty->termios->c_cc[i];	memcpy_tofs(termio, &tmp_termio, sizeof (struct termio));	return 0;}static int set_termio(struct tty_struct * tty, struct termio * termio,		      int channel){	struct termio tmp_termio;	struct termios tmp_termios;	tmp_termios = *tty->termios;	memcpy_fromfs(&tmp_termio, termio, sizeof (struct termio));#define SET_LOW_BITS(x,y)	((x) = (0xffff0000 & (x)) | (y))	SET_LOW_BITS(tmp_termios.c_iflag, tmp_termio.c_iflag);	SET_LOW_BITS(tmp_termios.c_oflag, tmp_termio.c_oflag);	SET_LOW_BITS(tmp_termios.c_cflag, tmp_termio.c_cflag);	SET_LOW_BITS(tmp_termios.c_lflag, tmp_termio.c_lflag);	memcpy(&tmp_termios.c_cc, &tmp_termio.c_cc, NCC);#undef SET_LOW_BITS	return set_termios_2(tty, &tmp_termios);}static int set_window_size(struct tty_struct * tty, struct winsize * ws){	struct winsize tmp_ws;	memcpy_fromfs(&tmp_ws, ws, sizeof (struct winsize));	if (memcmp(&tmp_ws, &tty->winsize, sizeof (struct winsize)) &&	    tty->pgrp > 0)		kill_pg(tty->pgrp, SIGWINCH, 1);	tty->winsize = tmp_ws;	return 0;}/* Set the discipline of a tty line. */static int tty_set_ldisc(struct tty_struct *tty, int ldisc){	if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS) ||	    !(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED))		return -EINVAL;	if (tty->disc == ldisc)		return 0;	/* We are already in the desired discipline */	/* Shutdown the current discipline. */	wait_until_sent(tty, 0);	flush_input(tty);	if (ldiscs[tty->disc].close)		ldiscs[tty->disc].close(tty);	/* Now set up the new line discipline. */	tty->disc = ldisc;	tty->termios->c_line = ldisc;	if (ldiscs[tty->disc].open)		return(ldiscs[tty->disc].open(tty));	else		return 0;}static unsigned long inq_canon(struct tty_struct * tty){	int nr, head, tail;	if (!tty->canon_data)		return 0;	head = tty->canon_head;	tail = tty->secondary.tail;	nr = (head - tail) & (TTY_BUF_SIZE-1);	/* Skip EOF-chars.. */	while (head != tail) {		if (test_bit(tail, &tty->secondary_flags) &&		    tty->secondary.buf[tail] == __DISABLED_CHAR)			nr--;		INC(tail);	}	return nr;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美精品区一区二区三区| 欧美三级在线看| 色噜噜狠狠成人网p站| 欧美日韩中文字幕一区| 日韩欧美三级在线| 国产婷婷色一区二区三区在线| 中文字幕在线免费不卡| 一区二区三区成人在线视频| 91美女福利视频| 在线电影欧美成精品| 国产丝袜欧美中文另类| 亚洲影院免费观看| 国产精品一区专区| 欧美日韩亚洲不卡| 国产亚洲一二三区| 亚洲综合一区二区精品导航| 精品一区二区三区av| 播五月开心婷婷综合| 91麻豆精品久久久久蜜臀| 国产精品丝袜一区| 免费成人在线视频观看| 99麻豆久久久国产精品免费| 日韩久久精品一区| 亚洲老妇xxxxxx| 国产一区二区在线影院| 欧美日韩国产在线观看| 日本一区二区电影| 秋霞电影网一区二区| 97久久精品人人澡人人爽| 精品国产一区二区三区四区四 | 91蜜桃视频在线| 精品国产乱码久久久久久久久 | 91电影在线观看| 久久久国产精品麻豆 | 欧美mv和日韩mv国产网站| 樱桃视频在线观看一区| 国产福利精品一区二区| 91麻豆精品国产自产在线观看一区| 自拍偷拍亚洲激情| 国产精品影视在线观看| 91久久精品国产91性色tv| 国产日韩欧美亚洲| 久久99精品视频| 欧美丰满一区二区免费视频| 亚洲六月丁香色婷婷综合久久 | 国产亚洲欧美色| 日韩在线一区二区三区| 在线视频欧美区| 综合自拍亚洲综合图不卡区| 国产在线视频不卡二| 日韩一区国产二区欧美三区| 国产欧美日韩在线| 欧美性一级生活| 中文乱码免费一区二区| 国产综合久久久久久久久久久久 | 亚洲线精品一区二区三区| 成人高清免费在线播放| 久久久99精品久久| 国产在线国偷精品免费看| 91麻豆精品国产自产在线观看一区| 一区二区国产盗摄色噜噜| 91美女在线看| 中文字幕在线一区免费| 3d成人h动漫网站入口| 樱花影视一区二区| 色婷婷国产精品久久包臀| 中文字幕制服丝袜一区二区三区| 国产一区二区三区免费观看| 欧美电影免费观看高清完整版| 日本亚洲电影天堂| 日韩天堂在线观看| 免费在线欧美视频| 日韩一区二区三区精品视频| 日本成人在线视频网站| 欧美一级搡bbbb搡bbbb| 免费观看日韩电影| 日韩久久久久久| 久久99日本精品| 久久久蜜臀国产一区二区| 成人欧美一区二区三区视频网页| 欧美成人一区二区三区片免费| 亚洲国产裸拍裸体视频在线观看乱了 | 日韩中文字幕区一区有砖一区| 欧美日韩综合在线| 丝袜美腿一区二区三区| 欧美一区二区三区免费| 蜜桃一区二区三区在线观看| 日韩欧美亚洲另类制服综合在线| 麻豆91在线看| 国产三级一区二区| 成人美女视频在线观看| 综合激情网...| 欧洲一区在线观看| 日日摸夜夜添夜夜添亚洲女人| 91精品国产综合久久婷婷香蕉| 人人精品人人爱| 久久先锋影音av鲁色资源网| 精品无码三级在线观看视频| 国产人妖乱国产精品人妖| 成人性色生活片免费看爆迷你毛片| 国产精品女同一区二区三区| 色综合天天天天做夜夜夜夜做| 亚洲精品国久久99热| 国产精品亚洲第一区在线暖暖韩国| 制服丝袜亚洲网站| 久久黄色级2电影| 欧美韩日一区二区三区| 91麻豆.com| 日韩av午夜在线观看| 亚洲精品一区二区三区影院 | 久久综合色播五月| 成人精品视频一区二区三区| 亚洲激情校园春色| 欧美电影免费提供在线观看| 成人黄色软件下载| 亚洲va国产va欧美va观看| 欧美成人福利视频| 99久久精品免费看| 婷婷综合另类小说色区| 一区二区三区鲁丝不卡| 欧美一区二区国产| aaa亚洲精品| 日本女人一区二区三区| 中文字幕在线不卡| 69av一区二区三区| 粉嫩aⅴ一区二区三区四区五区 | 欧美一区二区视频在线观看| 成人免费高清在线| 舔着乳尖日韩一区| 国产精品网站在线| 91精品黄色片免费大全| 夫妻av一区二区| 欧美96一区二区免费视频| 亚洲视频一区二区在线观看| 日韩色视频在线观看| 色综合久久久久久久久久久| 久久99精品久久只有精品| 亚洲一区自拍偷拍| 欧美国产日产图区| 日韩美一区二区三区| 91黄色小视频| 成人免费高清在线| 老汉av免费一区二区三区| 亚洲五码中文字幕| 中文字幕免费一区| 欧美xfplay| 欧美欧美欧美欧美首页| 99久久99久久精品免费看蜜桃| 久久99精品久久久久久动态图 | 欧美电影一区二区| 一本大道久久a久久综合婷婷| 国产麻豆欧美日韩一区| 免费美女久久99| 午夜电影一区二区三区| 一区二区三区免费看视频| 亚洲国产精品成人综合| 精品国产人成亚洲区| 制服丝袜亚洲精品中文字幕| 在线欧美日韩国产| 91免费视频网| 北条麻妃一区二区三区| 国产美女在线观看一区| 青青草91视频| 日韩精品一区第一页| 亚洲最色的网站| 一区二区在线观看视频在线观看| 国产精品青草久久| 久久久久9999亚洲精品| 精品国产电影一区二区| 欧美成人伊人久久综合网| 日韩一区二区在线观看视频| 欧美色精品在线视频| 欧美亚洲自拍偷拍| 欧美色中文字幕| 欧美午夜精品电影| 欧美在线播放高清精品| 91黄视频在线| 欧美亚洲综合在线| 欧美日韩精品是欧美日韩精品| 色94色欧美sute亚洲线路一ni | 一个色综合av| 一区二区三区欧美亚洲| 亚洲激情六月丁香| 亚洲综合另类小说| 亚洲成人免费看| 日韩福利视频网| 日本不卡免费在线视频| 免费成人美女在线观看| 蜜桃一区二区三区在线观看| 精品在线你懂的| 国产精品自拍一区| 成人午夜精品一区二区三区| 欧美成人一区二区三区在线观看| 日韩亚洲欧美一区二区三区| 欧美xxxx在线观看| 久久伊99综合婷婷久久伊| 日本一区二区三区四区| 中文字幕在线观看一区二区| 一区二区三区加勒比av| 无码av免费一区二区三区试看|