aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/ktzfls.x
blob: e22c1a98c8d7c7bf2e52fc0e1f0e91910da883c3 (plain) (blame)
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
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<mach.h>
include	<config.h>
include	"ki.h"

# KT_ZFLS -- Flush output to a text device.  We are called only if the device
# does not reside on the local node.

procedure kt_zfls (device, chan, status)

int	device			# device driver code
int	chan			# channel assigned device
int	status			# receives nchars written or ERR

int	server
int	ki_sendrcv()
include	"kichan.com"
include	"kii.com"

begin
	call ki_flushtx (device, chan, status)
	if (status == ERR)
	    return

	server   = k_node[chan]
	p_arg[1] = k_oschan[chan]

	if (ki_sendrcv (server, device, TX_FLS) == ERR)
	    status = ERR
	else
	    status = p_arg[1]
end