diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/ki/ksawait.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/ki/ksawait.x')
-rw-r--r-- | sys/ki/ksawait.x | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/ki/ksawait.x b/sys/ki/ksawait.x new file mode 100644 index 00000000..069826d5 --- /dev/null +++ b/sys/ki/ksawait.x @@ -0,0 +1,24 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "ki.h" + +# KS_AWAIT -- Wait for i/o to the kernel server device driver given the node +# descriptor of a kernel server channel. If the error bit is set on the +# node return immediately, since the channel will have been closed. + +procedure ks_await (server, status) + +int server # node descriptor index of server +int status # receives i/o status + +int and() +include "kinode.com" + +begin + if (and (n_status[server], F_IOERR) == 0) { + call zawtks (n_kschan[server], status) + if (status == ERR) + call ki_error (server) + } else + status = ERR +end |