tty: Implement exclusive mode
Implemented exclusive mode on Haiku and added the related `ioctl` operations (`TIOCEXCL` and `TIOCNXCL`). Change-Id: Iaa201ea20eec0e45d02dd5db9ba6aa35fd27dfb2 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6387 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Jessica Hamilton <[email protected]>
This commit is contained in:
committed by
Jessica Hamilton
parent
bbd6beb7ee
commit
b197dcbafa
@@ -46,12 +46,12 @@ typedef struct tty_module_info tty_module_info;
|
||||
struct tty_module_info {
|
||||
module_info mi;
|
||||
|
||||
struct tty *(*tty_create)(tty_service_func serviceFunction, struct tty* master);
|
||||
status_t (*tty_create)(tty_service_func serviceFunction, struct tty *master,
|
||||
struct tty **tty);
|
||||
void (*tty_destroy)(struct tty *tty);
|
||||
|
||||
struct tty_cookie *
|
||||
(*tty_create_cookie)(struct tty *masterTTY, struct tty *slaveTTY,
|
||||
uint32 openMode);
|
||||
status_t (*tty_create_cookie)(struct tty *masterTTY, struct tty *slaveTTY,
|
||||
uint32 openMode, struct tty_cookie **cookie);
|
||||
void (*tty_close_cookie)(struct tty_cookie *cookie);
|
||||
void (*tty_destroy_cookie)(struct tty_cookie *cookie);
|
||||
|
||||
|
||||
@@ -189,6 +189,8 @@ struct termios {
|
||||
#define TIOCMBIC (TCGETA + 23) /* clear bits in line state */
|
||||
#define TIOCGSID (TCGETA + 24) /* get session leader process group ID */
|
||||
#define TIOCOUTQ (TCGETA + 25) /* get output queue size */
|
||||
#define TIOCEXCL (TCGETA + 26) /* set exclusive use of tty */
|
||||
#define TIOCNXCL (TCGETA + 27) /* clear exclusive use of tty */
|
||||
|
||||
/* Event codes. Returned from TCWAITEVENT */
|
||||
#define EV_RING 0x0001
|
||||
|
||||
Reference in New Issue
Block a user