Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git] / lunaix-os / includes / usr / lunaix / ioctl_defs.h
1 #ifndef __LUNAIX_SYS_IOCTL_DEFS_H
2 #define __LUNAIX_SYS_IOCTL_DEFS_H
3
4 #define IOREQ(cmd, arg_num) ((((cmd) & 0xffff) << 8) | ((arg_num) & 0xff))
5
6 #define IOCMD(req) ((req) >> 8)
7
8 #define IOARGNUM(req) ((req) & 0xff)
9
10 #define DEVIOIDENT IOREQ(-1, 1)
11
12 #define TIOCGPGRP IOREQ(1, 0)
13 #define TIOCSPGRP IOREQ(1, 1)
14 #define TIOCCLSBUF IOREQ(2, 0)
15 #define TIOCFLUSH IOREQ(3, 0)
16
17 #define RTCIO_IUNMSK IOREQ(1, 0)
18 #define RTCIO_IMSK IOREQ(2, 0)
19 #define RTCIO_SETFREQ IOREQ(3, 1)
20 #define RTCIO_GETINFO IOREQ(4, 1)
21 #define RTCIO_SETDT IOREQ(5, 1)
22
23 #define TIMERIO_GETINFO IOREQ(1, 0)
24
25 #endif /* __LUNAIX_IOCTL_DEFS_H */