summaryrefslogtreecommitdiff
path: root/LibC
AgeCommit message (Collapse)Author
2018-11-01Waiters should be notified when a waitee is killed.Andreas Kling
Ran into a horrendous bug where VirtualConsole would overrun its buffer and scribble right into some other object if we were interrupted while processing a character. Slapped an InterruptDisabler onto onChar for now. This provokes an interesting question though.. if a process is killed while its in kernel space, how the heck do we release any locks it held? I'm sure there are many different solutions to this problem, but I'll have to think about it.
2018-10-31perror() should send output to stderr.Andreas Kling
2018-10-31Add SpinLock to IDE disk access.Andreas Kling
This forces serialization of accesses. This driver needs to be redesigned.
2018-10-31Snazz up the kprintf() output a bit by giving it its own color.Andreas Kling
2018-10-31Add getpwent() family of functions to LibC.Andreas Kling
Also add a little /etc/passwd database. There's just me in there.
2018-10-31Enough compatibility work to make figlet build and run!Andreas Kling
I ran out of steam writing library routines and imported two BSD-licensed libc routines: sscanf() and getopt(). I will most likely rewrite them sooner or later. For now I just wanted to see figlet running.
2018-10-31Fix wrong allocation size used in opendir().Andreas Kling
2018-10-31Use ALWAYS_INLINE for ctype inlines.Andreas Kling
2018-10-31More LibC portability work while trying to get figlet building.Andreas Kling
2018-10-31A bunch of LibC boilerplate stuff added while trying to get figlet to build.Andreas Kling
2018-10-31Implement basic sys$kill() and add a /bin/killAndreas Kling
All it can do right now is send SIGKILL which just murders the target task.
2018-10-31Minor cleanup.Andreas Kling
2018-10-30Add sys$ttyname_r and ttyname_r() + ttyname().Andreas Kling
And print a greeting when sh starts up so we know which TTY we're on.
2018-10-30Virtual consoles kinda work!Andreas Kling
We now make three VirtualConsoles at boot: tty0, tty1, and tty2. We launch an instance of /bin/sh in each one. You switch between them with Alt+1/2/3 How very very cool :^)
2018-10-28Add basic symlink support.Andreas Kling
- sys$readlink + readlink() - Add a /proc/PID/exe symlink to the process's executable. - Print symlink contents in ls output. - Some work on plumbing options into VFS::open().
2018-10-28Add sys$set_mmap_name and use it from LibC's malloc.Andreas Kling
It's nice to be able to identify mmap's in /proc/PID/vm.
2018-10-28Canonicalize the path used by sh.Andreas Kling
With a bunch of LibC work to support the feature. LibC now initializes AK::StringImpl by default. It's now fine to use AK in LibC/Userland! :^)
2018-10-27Add some basic field width support to printf().Andreas Kling
Use it to make "ls" output a bit better. Also sys$spawn now fails with EACCES if the path is not a file that's executable by the current uid/gid.
2018-10-27Implement loading of linked ELF executables.Andreas Kling
This took me a couple hours. :^) The ELF loading code now allocates a single region for the entire file and creates virtual memory mappings for the sections as needed. Very nice!
2018-10-27Implement waitpid() support for getting the waitee's exit code.Andreas Kling
2018-10-26Add sys$uname() and a /bin/uname utility.Andreas Kling
2018-10-26Implement sys$chdir() and teach sh+ls to cd around and browse different dirs.Andreas Kling
2018-10-26Add memcpy() and strcmp() to LibC.Andreas Kling
2018-10-26Implement argc/argv support for spawned tasks.Andreas Kling
Celebrate the new functionality with a simple /bin/cat implementation. :^)
2018-10-26Add sys$gethostname and /bin/hostnameAndreas Kling
2018-10-25Add gettimeofday() syscall and LibC wrappers gettimeofday() and time().Andreas Kling
This only has second accuracy right now, I'll work out subseconds later.
2018-10-25Add a "sleep" syscall that sleeps for N seconds.Andreas Kling
2018-10-25Implement errno in LibC.Andreas Kling
This also meant I had to implement BSS (SHT_NOBITS) sections in ELFLoader. I also added an strerror() so we can print out what the errors are.
2018-10-25ELFLoader should fail with an error message for unresolved symbols.Andreas Kling
2018-10-24Add a "pwd" utility to userland.Andreas Kling
It's implemented as a separate process. How cute is that. Tasks now have a current working directory. Spawned tasks inherit their parent task's working directory. Currently everyone just uses "/" as there's no way to chdir().
2018-10-24Add an lstat() syscall and use it to make "ls" nicer.Andreas Kling
2018-10-24Lots of hacking to make a very simple "ls" utility.Andreas Kling
I added a dead-simple malloc that only allows allocations < 4096 bytes. It just forwards the request to mmap() every time. I also added simplified versions of opendir() and readdir().
2018-10-24Add simplified mmap() and munmap() syscalls.Andreas Kling
2018-10-24Add a simplified waitpid() so that sh can wait on spawned commands.Andreas Kling
2018-10-23Generalize the SpinLock and move it to AK.Andreas Kling
Add a separate lock to protect the VFS. I think this might be a good idea. I'm not sure it's a good approach though. I'll fiddle with it as I go along. It's really fun to figure out all these things on my own.
2018-10-23Lots of hacking:Andreas Kling
- 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.
2018-10-22Launching an arbitrary ELF executable from disk works! :^)Andreas Kling
This is so cool! It's a bit messy now with two Task constructors, but eventually they should fold into a single constructor somehow.
2018-10-22Okay, with some mucking around, there is now a /bin/id and it runs!Andreas Kling
It statically links against everything in LibC that it needs. This will work just fine for a long time to come!
2018-10-22Link "id" against the LibC.Andreas Kling
We can now produce what should essentially be a runnable Serenity executable.
2018-10-22Import very modest Userland.Andreas Kling
2018-10-22Start work on a standard C library. I'm calling it... LibC.Andreas Kling