summaryrefslogtreecommitdiff
path: root/LibC/stdlib.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-06 10:46:40 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-06 10:56:41 +0100
commit153ea704af5e22c70e169f112e9df3e4cd9a6f11 (patch)
treee879dcf3decc9e162d3a4f0a746b05214b7899c1 /LibC/stdlib.h
parent52d502e11f3207f2c5c36e7cc676f43f249fc351 (diff)
downloadserenity-153ea704af5e22c70e169f112e9df3e4cd9a6f11.zip
Add some basic signal support.
It only works for sending a signal to a process that's in userspace code. We implement reception by synthesizing a PUSHA+PUSHF in the receiving process (operating on values in the TSS.) The TSS CS:EIP is then rerouted to the signal handler and a tiny return trampoline is constructed in a dedicated region in the receiving process. Also hacked up /bin/kill to be able to send arbitrary signals (kill -N PID)
Diffstat (limited to 'LibC/stdlib.h')
-rw-r--r--LibC/stdlib.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/LibC/stdlib.h b/LibC/stdlib.h
index 0a6102719a..0cd6a8e2c8 100644
--- a/LibC/stdlib.h
+++ b/LibC/stdlib.h
@@ -5,15 +5,15 @@
__BEGIN_DECLS
-void* malloc(size_t);
+void* malloc(size_t) __MALLOC;
void free(void*);
void* calloc(size_t nmemb, size_t);
void* realloc(void *ptr, size_t);
char* getenv(const char* name);
int atoi(const char*);
-void exit(int status);
-void abort();
+void exit(int status) __NORETURN;
+void abort() __NORETURN;
__END_DECLS