summaryrefslogtreecommitdiff
path: root/LibC/string.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-23 10:12:50 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-23 10:12:50 +0200
commitfe237ee215fafd2012e6f4e5da88e3c2b8f9d33d (patch)
tree9c88982f0717bd2ee465d19ccb967dd1b27de91f /LibC/string.cpp
parent72514c8b97891a3a032ae7b3003064ac9cf554e7 (diff)
downloadserenity-fe237ee215fafd2012e6f4e5da88e3c2b8f9d33d.zip
Lots of hacking:
- Turn Keyboard into a CharacterDevice (85,1) at /dev/keyboard. - Implement MM::unmapRegionsForTask() and MM::unmapRegion() - Save SS correctly on interrupt. - Add a simple Spawn syscall for launching another process. - Move a bunch of IO syscall debug output behind DEBUG_IO. - Have ASSERT do a "cli" immediately when failing. This makes the output look proper every time. - Implement a bunch of syscalls in LibC. - Add a simple shell ("sh"). All it can do now is read a line of text from /dev/keyboard and then try launching the specified executable by calling spawn(). There are definitely bugs in here, but we're moving on forward.
Diffstat (limited to 'LibC/string.cpp')
-rw-r--r--LibC/string.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/LibC/string.cpp b/LibC/string.cpp
new file mode 100644
index 0000000000..252dc65657
--- /dev/null
+++ b/LibC/string.cpp
@@ -0,0 +1,14 @@
+#include "string.h"
+
+extern "C" {
+
+size_t strlen(const char* str)
+{
+ size_t len = 0;
+ while (*(str++))
+ ++len;
+ return len;
+}
+
+}
+