Kernel/LibC: Replace terminal syscalls with ioctls

isatty, tc{get,set}attr, tc{get,set}pgrp are now implemented as ioctls
instead of separate syscalls
This commit is contained in:
2026-05-15 16:38:36 +03:00
parent fe2c9f7d2d
commit 05c9f0640c
9 changed files with 114 additions and 160 deletions

View File

@@ -56,6 +56,7 @@ namespace Kernel
pid_t pid() const { return m_pid; }
bool is_session_leader() const { return pid() == sid(); }
bool is_pgrpg_in_this_session(pid_t) const;
const char* name() const { return m_cmdline.empty() ? "<unknown>" : m_cmdline.front().data(); }
@@ -63,9 +64,6 @@ namespace Kernel
BAN::ErrorOr<long> sys_exit(int status);
BAN::ErrorOr<long> sys_tcgetattr(int fildes, termios*);
BAN::ErrorOr<long> sys_tcsetattr(int fildes, int optional_actions, const termios*);
BAN::ErrorOr<long> sys_fork(uintptr_t rsp, uintptr_t rip);
BAN::ErrorOr<long> sys_exec(const char* path, const char* const* argv, const char* const* envp);
@@ -186,7 +184,6 @@ namespace Kernel
BAN::ErrorOr<long> sys_smo_map(SharedMemoryObjectManager::Key);
BAN::ErrorOr<long> sys_ttyname(int fildes, char* name, size_t namesize);
BAN::ErrorOr<long> sys_isatty(int fildes);
BAN::ErrorOr<long> sys_posix_openpt(int flags);
BAN::ErrorOr<long> sys_ptsname(int fildes, char* buffer, size_t buffer_len);
@@ -218,9 +215,6 @@ namespace Kernel
BAN::ErrorOr<long> sys_pthread_self();
BAN::ErrorOr<long> sys_pthread_kill(pthread_t thread, int signal);
BAN::ErrorOr<long> sys_tcgetpgrp(int fd);
BAN::ErrorOr<long> sys_tcsetpgrp(int fd, pid_t pgid);
BAN::ErrorOr<long> sys_clock_gettime(clockid_t, timespec*);
BAN::ErrorOr<long> sys_load_keymap(const char* path);