summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ptycon_ioctl_impl.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-07-05 17:00:06 -0400
committermidipix <writeonce@midipix.org>2016-07-21 03:47:25 -0400
commit538c8a5109b56d1d0a26631fa93913341214501d (patch)
tree72933385600f4524afc6e7a96e9f62a9d3dd069f /src/internal/ptycon_ioctl_impl.h
parent4695532805c24af1965ef1407720c8db086e14b3 (diff)
downloadptycon-538c8a5109b56d1d0a26631fa93913341214501d.tar.bz2
ptycon-538c8a5109b56d1d0a26631fa93913341214501d.tar.xz
pty layer: added ptyc_alloc_pty(), ptyc_free_pty().
Diffstat (limited to 'src/internal/ptycon_ioctl_impl.h')
-rw-r--r--src/internal/ptycon_ioctl_impl.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/internal/ptycon_ioctl_impl.h b/src/internal/ptycon_ioctl_impl.h
new file mode 100644
index 0000000..dacd689
--- /dev/null
+++ b/src/internal/ptycon_ioctl_impl.h
@@ -0,0 +1,22 @@
+#ifndef PTYCON_IOCTL_IMPL_H
+#define PTYCON_IOCTL_IMPL_H
+
+#include <ntapi/ntapi.h>
+
+static int32_t ptyc_grant(nt_pty * hptm)
+{
+ nt_tty_sigctl_info ctlinfo;
+ nt_iosb iosb;
+
+ ntapi->tt_aligned_block_memset(
+ &ctlinfo,0,sizeof(ctlinfo));
+
+ return ntapi->pty_ioctl(
+ hptm,
+ 0,0,0,
+ &iosb,TTY_TIOCSPTLCK,
+ &ctlinfo,sizeof(ctlinfo),
+ &ctlinfo,sizeof(ctlinfo));
+}
+
+#endif