⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcpwakeup.c,v

📁 关于TCP方面的
💻 C,V
字号:
head	1.2;access;symbols;locks	dls:1.2; strict;comment	@ * @;1.2date	97.09.21.19.29.52;	author dls;	state Dist;branches;next	1.1;1.1date	94.01.14.03.51.20;	author dls;	state v2e1;branches;next	;desc@@1.2log@pre-3e code@text@/* tcpwakeup.c - tcpwakeup */#include <conf.h>#include <kernel.h>#include <network.h>/*------------------------------------------------------------------------ *  tcpwakeup -  wake up processes sleeping for TCP, if necessary *	NB: Called with tcb_mutex HELD *------------------------------------------------------------------------ */int tcpwakeup(type, ptcb)int		type;struct	tcb	*ptcb;{	int		freelen;	STATWORD	ps;	disable(ps);	if (type & READERS) {		if (((ptcb->tcb_flags & TCBF_RDONE) ||		    ptcb->tcb_rbcount > 0 ||		    (ptcb->tcb_flags & TCBF_RUPOK)) &&		    scount(ptcb->tcb_rsema) <= 0)			signal(ptcb->tcb_rsema);	}	if (type & WRITERS) {		freelen = ptcb->tcb_sbsize - ptcb->tcb_sbcount;		if (((ptcb->tcb_flags & TCBF_SDONE) || freelen > 0) &&		    scount(ptcb->tcb_ssema) <= 0)			signal(ptcb->tcb_ssema);		/* special for abort */		if (ptcb->tcb_error && ptcb->tcb_ocsem > 0)			signal(ptcb->tcb_ocsem);	}	restore(ps);	return OK;}@1.1log@Initial revision@text@a15 1d21 2a22 1		    ptcb->tcb_rbcount > 0 || ptcb->tcb_rudq >= 0) &&@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -