コード例 #1
0
void
net·runtime_pollOpen(uintptr fd, PollDesc* pd, intgo errno)
{
	pd = 0;
	FLUSH(&pd);
	errno = 0;
	FLUSH(&errno);
#line 96 "C:\Users\gopher\AppData\Local\Temp\1\makerelease745458658\go\src\pkg\runtime\netpoll.goc"

	pd = allocPollDesc();
	runtime·lock(pd);
	if(pd->wg != nil && pd->wg != READY)
		runtime·throw("runtime_pollOpen: blocked write on free descriptor");
	if(pd->rg != nil && pd->rg != READY)
		runtime·throw("runtime_pollOpen: blocked read on free descriptor");
	pd->fd = fd;
	pd->closing = false;
	pd->seq++;
	pd->rg = nil;
	pd->rd = 0;
	pd->wg = nil;
	pd->wd = 0;
	runtime·unlock(pd);

	errno = runtime·netpollopen(fd, pd);
	FLUSH(&pd);
	FLUSH(&errno);
}
コード例 #2
0
ファイル: znetpoll_windows_386.c プロジェクト: rosrad/go-rep
void
net·runtime_pollOpen(uintptr fd, PollDesc* pd, intgo errno)
{
    pd = 0;
    FLUSH(&pd);
    errno = 0;
    FLUSH(&errno);
#line 96 "/home/14/ren/source/golang/go/src/pkg/runtime/netpoll.goc"

    pd = allocPollDesc();
    runtime·lock(pd);
    if(pd->wg != nil && pd->wg != READY)
        runtime·throw("runtime_pollOpen: blocked write on free descriptor");
    if(pd->rg != nil && pd->rg != READY)
        runtime·throw("runtime_pollOpen: blocked read on free descriptor");
    pd->fd = fd;
    pd->closing = false;
    pd->seq++;
    pd->rg = nil;
    pd->rd = 0;
    pd->wg = nil;
    pd->wd = 0;
    runtime·unlock(pd);

    errno = runtime·netpollopen(fd, pd);
    FLUSH(&pd);
    FLUSH(&errno);
}
コード例 #3
0
void
net·runtime_pollOpen(uintptr fd, PollDesc* pd, intgo errno)
{
#line 66 "/tmp/makerelease886106415/go/src/pkg/runtime/netpoll.goc"

	pd = allocPollDesc();
	runtime·lock(pd);
	if(pd->wg != nil && pd->wg != READY)
		runtime·throw("runtime_pollOpen: blocked write on free descriptor");
	if(pd->rg != nil && pd->rg != READY)
		runtime·throw("runtime_pollOpen: blocked read on free descriptor");
	pd->fd = fd;
	pd->closing = false;
	pd->seq++;
	pd->rg = nil;
	pd->rd = 0;
	pd->wg = nil;
	pd->wd = 0;
	runtime·unlock(pd);

	errno = runtime·netpollopen(fd, pd);
	FLUSH(&pd);
	FLUSH(&errno);
}