summaryrefslogtreecommitdiff
path: root/LibC
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-06 13:23:22 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-06 13:33:54 +0100
commit3024167cbd6ea560c02b4afc3dc341098fd9337f (patch)
treea3d0e082f9671b7e74dc7f2c7c552fa06c9b9814 /LibC
parent46f0c28a4a7cbafb26289647363864e1eb82b53a (diff)
downloadserenity-3024167cbd6ea560c02b4afc3dc341098fd9337f.zip
Change syscall naming scheme.
Diffstat (limited to 'LibC')
-rw-r--r--LibC/dirent.cpp2
-rw-r--r--LibC/entry.cpp6
-rw-r--r--LibC/mman.cpp6
-rw-r--r--LibC/process.cpp2
-rw-r--r--LibC/signal.cpp6
-rw-r--r--LibC/stdlib.cpp2
-rw-r--r--LibC/time.cpp2
-rw-r--r--LibC/unistd.cpp62
-rw-r--r--LibC/utsname.cpp2
9 files changed, 45 insertions, 45 deletions
diff --git a/LibC/dirent.cpp b/LibC/dirent.cpp
index 0914e856f3..9e4ee1c7fe 100644
--- a/LibC/dirent.cpp
+++ b/LibC/dirent.cpp
@@ -52,7 +52,7 @@ dirent* readdir(DIR* dirp)
if (!dirp->buffer) {
// FIXME: Figure out how much to actually allocate.
dirp->buffer = (char*)malloc(4096);
- ssize_t nread = Syscall::invoke(Syscall::GetDirEntries, (dword)dirp->fd, (dword)dirp->buffer, 4096);
+ ssize_t nread = Syscall::invoke(Syscall::SC_get_dir_entries, (dword)dirp->fd, (dword)dirp->buffer, 4096);
dirp->buffer_size = nread;
dirp->nextptr = dirp->buffer;
}
diff --git a/LibC/entry.cpp b/LibC/entry.cpp
index 3d338dc0ac..d8dc22d565 100644
--- a/LibC/entry.cpp
+++ b/LibC/entry.cpp
@@ -34,16 +34,16 @@ extern "C" int _start()
int status = 254;
int argc;
char** argv;
- int rc = Syscall::invoke(Syscall::GetArguments, (dword)&argc, (dword)&argv);
+ int rc = Syscall::invoke(Syscall::SC_get_arguments, (dword)&argc, (dword)&argv);
if (rc < 0)
goto epilogue;
- rc = Syscall::invoke(Syscall::GetEnvironment, (dword)&environ);
+ rc = Syscall::invoke(Syscall::SC_get_environment, (dword)&environ);
if (rc < 0)
goto epilogue;
status = main(argc, argv);
epilogue:
- Syscall::invoke(Syscall::PosixExit, status);
+ Syscall::invoke(Syscall::SC_exit, status);
// Birger's birthday <3
return 20150614;
diff --git a/LibC/mman.cpp b/LibC/mman.cpp
index 53c0b921d6..5e13e8e268 100644
--- a/LibC/mman.cpp
+++ b/LibC/mman.cpp
@@ -6,19 +6,19 @@ extern "C" {
void* mmap(void* addr, size_t size)
{
- int rc = Syscall::invoke(Syscall::PosixMmap, (dword)addr, (dword)size);
+ int rc = Syscall::invoke(Syscall::SC_mmap, (dword)addr, (dword)size);
__RETURN_WITH_ERRNO(rc, (void*)rc, (void*)-1);
}
int munmap(void* addr, size_t size)
{
- int rc = Syscall::invoke(Syscall::PosixMunmap, (dword)addr, (dword)size);
+ int rc = Syscall::invoke(Syscall::SC_munmap, (dword)addr, (dword)size);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int set_mmap_name(void* addr, size_t size, const char* name)
{
- int rc = Syscall::invoke(Syscall::SetMmapName, (dword)addr, (dword)size, (dword)name);
+ int rc = Syscall::invoke(Syscall::SC_set_mmap_name, (dword)addr, (dword)size, (dword)name);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
diff --git a/LibC/process.cpp b/LibC/process.cpp
index 96c6a93540..65d82c0009 100644
--- a/LibC/process.cpp
+++ b/LibC/process.cpp
@@ -6,7 +6,7 @@ extern "C" {
int spawn(const char* path, const char** args, const char** envp)
{
- int rc = Syscall::invoke(Syscall::Spawn, (dword)path, (dword)args, (dword)envp);
+ int rc = Syscall::invoke(Syscall::SC_spawn, (dword)path, (dword)args, (dword)envp);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
diff --git a/LibC/signal.cpp b/LibC/signal.cpp
index 3bbcc2a2ae..c42802df12 100644
--- a/LibC/signal.cpp
+++ b/LibC/signal.cpp
@@ -7,13 +7,13 @@ extern "C" {
int kill(pid_t pid, int sig)
{
- int rc = Syscall::invoke(Syscall::PosixKill, (dword)pid, (dword)sig);
+ int rc = Syscall::invoke(Syscall::SC_kill, (dword)pid, (dword)sig);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
sighandler_t signal(int signum, sighandler_t handler)
{
- sighandler_t old_handler = (sighandler_t)Syscall::invoke(Syscall::PosixSignal, (dword)signum, (dword)handler);
+ sighandler_t old_handler = (sighandler_t)Syscall::invoke(Syscall::SC_signal, (dword)signum, (dword)handler);
if (old_handler == SIG_ERR) {
errno = EINVAL;
return SIG_ERR;
@@ -24,7 +24,7 @@ sighandler_t signal(int signum, sighandler_t handler)
int sigaction(int signum, const struct sigaction* act, struct sigaction* old_act)
{
- int rc = Syscall::invoke(Syscall::Sigaction, (dword)signum, (dword)act, (dword)old_act);
+ int rc = Syscall::invoke(Syscall::SC_sigaction, (dword)signum, (dword)act, (dword)old_act);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
diff --git a/LibC/stdlib.cpp b/LibC/stdlib.cpp
index f4482e9b11..fa6c91fb4c 100644
--- a/LibC/stdlib.cpp
+++ b/LibC/stdlib.cpp
@@ -61,7 +61,7 @@ void* realloc(void *ptr, size_t)
void exit(int status)
{
- Syscall::invoke(Syscall::PosixExit, (dword)status);
+ Syscall::invoke(Syscall::SC_exit, (dword)status);
}
void abort()
diff --git a/LibC/time.cpp b/LibC/time.cpp
index cc66535f62..b1bee00557 100644
--- a/LibC/time.cpp
+++ b/LibC/time.cpp
@@ -15,7 +15,7 @@ time_t time(time_t* tloc)
int gettimeofday(struct timeval* tv, struct timezone*)
{
- int rc = Syscall::invoke(Syscall::PosixGettimeofday, (dword)tv);
+ int rc = Syscall::invoke(Syscall::SC_gettimeofday, (dword)tv);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
diff --git a/LibC/unistd.cpp b/LibC/unistd.cpp
index 46cb713996..058222581f 100644
--- a/LibC/unistd.cpp
+++ b/LibC/unistd.cpp
@@ -9,74 +9,74 @@ extern "C" {
pid_t fork()
{
- int rc = Syscall::invoke(Syscall::PosixFork);
+ int rc = Syscall::invoke(Syscall::SC_fork);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int execve(const char* filename, const char** argv, const char** envp)
{
- int rc = Syscall::invoke(Syscall::PosixExecve, (dword)filename, (dword)argv, (dword)envp);
+ int rc = Syscall::invoke(Syscall::SC_execve, (dword)filename, (dword)argv, (dword)envp);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
uid_t getuid()
{
- return Syscall::invoke(Syscall::PosixGetuid);
+ return Syscall::invoke(Syscall::SC_getuid);
}
gid_t getgid()
{
- return Syscall::invoke(Syscall::PosixGetgid);
+ return Syscall::invoke(Syscall::SC_getgid);
}
uid_t geteuid()
{
- return Syscall::invoke(Syscall::PosixGeteuid);
+ return Syscall::invoke(Syscall::SC_geteuid);
}
gid_t getegid()
{
- return Syscall::invoke(Syscall::PosixGetegid);
+ return Syscall::invoke(Syscall::SC_getegid);
}
pid_t getpid()
{
- return Syscall::invoke(Syscall::PosixGetpid);
+ return Syscall::invoke(Syscall::SC_getpid);
}
pid_t setsid()
{
- int rc = Syscall::invoke(Syscall::PosixSetsid);
+ int rc = Syscall::invoke(Syscall::SC_setsid);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
pid_t tcgetpgrp(int fd)
{
- int rc = Syscall::invoke(Syscall::PosixTcgetpgrp, (dword)fd);
+ int rc = Syscall::invoke(Syscall::SC_tcgetpgrp, (dword)fd);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int tcsetpgrp(int fd, pid_t pgid)
{
- int rc = Syscall::invoke(Syscall::PosixTcsetpgrp, (dword)fd, (dword)pgid);
+ int rc = Syscall::invoke(Syscall::SC_tcsetpgrp, (dword)fd, (dword)pgid);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int setpgid(pid_t pid, pid_t pgid)
{
- int rc = Syscall::invoke(Syscall::PosixSetpgid, (dword)pid, (dword)pgid);
+ int rc = Syscall::invoke(Syscall::SC_setpgid, (dword)pid, (dword)pgid);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
pid_t getpgid(pid_t pid)
{
- int rc = Syscall::invoke(Syscall::PosixGetpgid, (dword)pid);
+ int rc = Syscall::invoke(Syscall::SC_getpgid, (dword)pid);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
pid_t getpgrp()
{
- int rc = Syscall::invoke(Syscall::PosixGetpgrp);
+ int rc = Syscall::invoke(Syscall::SC_getpgrp);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
@@ -84,26 +84,26 @@ int open(const char* path, int options, ...)
{
va_list ap;
va_start(ap, options);
- int rc = Syscall::invoke(Syscall::PosixOpen, (dword)path, (dword)options, (dword)ap);
+ int rc = Syscall::invoke(Syscall::SC_open, (dword)path, (dword)options, (dword)ap);
va_end(ap);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
ssize_t read(int fd, void* buf, size_t count)
{
- int rc = Syscall::invoke(Syscall::PosixRead, (dword)fd, (dword)buf, (dword)count);
+ int rc = Syscall::invoke(Syscall::SC_read, (dword)fd, (dword)buf, (dword)count);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
ssize_t write(int fd, const void* buf, size_t count)
{
- int rc = Syscall::invoke(Syscall::PosixWrite, (dword)fd, (dword)buf, (dword)count);
+ int rc = Syscall::invoke(Syscall::SC_write, (dword)fd, (dword)buf, (dword)count);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int ttyname_r(int fd, char* buffer, size_t size)
{
- int rc = Syscall::invoke(Syscall::PosixTtynameR, (dword)fd, (dword)buffer, (dword)size);
+ int rc = Syscall::invoke(Syscall::SC_ttyname_r, (dword)fd, (dword)buffer, (dword)size);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
@@ -117,60 +117,60 @@ char* ttyname(int fd)
int close(int fd)
{
- int rc = Syscall::invoke(Syscall::PosixClose, fd);
+ int rc = Syscall::invoke(Syscall::SC_close, fd);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
pid_t waitpid(pid_t waitee, int* wstatus, int options)
{
- int rc = Syscall::invoke(Syscall::PosixWaitpid, waitee, (dword)wstatus);
+ int rc = Syscall::invoke(Syscall::SC_waitpid, waitee, (dword)wstatus);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int lstat(const char* path, struct stat* statbuf)
{
- int rc = Syscall::invoke(Syscall::PosixLstat, (dword)path, (dword)statbuf);
+ int rc = Syscall::invoke(Syscall::SC_lstat, (dword)path, (dword)statbuf);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int stat(const char* path, struct stat* statbuf)
{
- int rc = Syscall::invoke(Syscall::PosixStat, (dword)path, (dword)statbuf);
+ int rc = Syscall::invoke(Syscall::SC_stat, (dword)path, (dword)statbuf);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int chdir(const char* path)
{
- int rc = Syscall::invoke(Syscall::PosixChdir, (dword)path);
+ int rc = Syscall::invoke(Syscall::SC_chdir, (dword)path);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
char* getcwd(char* buffer, size_t size)
{
- int rc = Syscall::invoke(Syscall::PosixGetcwd, (dword)buffer, (dword)size);
+ int rc = Syscall::invoke(Syscall::SC_getcwd, (dword)buffer, (dword)size);
__RETURN_WITH_ERRNO(rc, buffer, nullptr);
}
int sleep(unsigned seconds)
{
- return Syscall::invoke(Syscall::Sleep, (dword)seconds);
+ return Syscall::invoke(Syscall::SC_sleep, (dword)seconds);
}
int gethostname(char* buffer, size_t size)
{
- int rc = Syscall::invoke(Syscall::PosixGethostname, (dword)buffer, (dword)size);
+ int rc = Syscall::invoke(Syscall::SC_gethostname, (dword)buffer, (dword)size);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
ssize_t readlink(const char* path, char* buffer, size_t size)
{
- int rc = Syscall::invoke(Syscall::PosixReadlink, (dword)path, (dword)buffer, (dword)size);
+ int rc = Syscall::invoke(Syscall::SC_readlink, (dword)path, (dword)buffer, (dword)size);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
off_t lseek(int fd, off_t offset, int whence)
{
- int rc = Syscall::invoke(Syscall::PosixLseek, (dword)fd, (dword)offset, (dword)whence);
+ int rc = Syscall::invoke(Syscall::SC_lseek, (dword)fd, (dword)offset, (dword)whence);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
@@ -186,25 +186,25 @@ int unlink(const char*)
int isatty(int fd)
{
- int rc = Syscall::invoke(Syscall::PosixIsatty, (dword)fd);
+ int rc = Syscall::invoke(Syscall::SC_isatty, (dword)fd);
__RETURN_WITH_ERRNO(rc, 1, 0);
}
int getdtablesize()
{
- int rc = Syscall::invoke(Syscall::Getdtablesize);
+ int rc = Syscall::invoke(Syscall::SC_getdtablesize);
__RETURN_WITH_ERRNO(rc, 1, 0);
}
int dup(int old_fd)
{
- int rc = Syscall::invoke(Syscall::Dup, (dword)old_fd);
+ int rc = Syscall::invoke(Syscall::SC_dup, (dword)old_fd);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int dup2(int old_fd, int new_fd)
{
- int rc = Syscall::invoke(Syscall::Dup2, (dword)old_fd, (dword)new_fd);
+ int rc = Syscall::invoke(Syscall::SC_dup2, (dword)old_fd, (dword)new_fd);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
diff --git a/LibC/utsname.cpp b/LibC/utsname.cpp
index d01232704a..a6ca736261 100644
--- a/LibC/utsname.cpp
+++ b/LibC/utsname.cpp
@@ -6,7 +6,7 @@ extern "C" {
int uname(struct utsname* buf)
{
- int rc = Syscall::invoke(Syscall::PosixUname, (dword)buf);
+ int rc = Syscall::invoke(Syscall::SC_uname, (dword)buf);
__RETURN_WITH_ERRNO(rc, rc, -1);
}