Andreas Kling
5eedb22834
Sprinkle use of AK::Vector in various places.
...
Some of these are less helpful than others. Avoiding a bunch of mallocs
in the event loop wakeup code is definitely nice.
2019-04-20 14:02:19 +02:00
Andreas Kling
6d4874cb2e
LibC: Get rid of the now-unneeded AK/kmalloc.cpp
2019-04-20 13:00:25 +02:00
Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
9ef06e2117
LibC: stddbg should be opened with O_CLOEXEC.
2019-04-18 22:20:01 +02:00
Andreas Kling
3817f5f619
Kernel+LibC: Add a DebugLogDevice that forwards everything to I/O port 0xe9.
...
This is then used to implement the userspace dbgprintf() in a far more
efficient way than what we had before. :^)
2019-04-18 16:08:52 +02:00
Andreas Kling
34087a9f90
LibC: Bring the C library close enough to newlib to trick GCC.
...
Now we can build GCC with --with-newlib, which hopefully cuts down on weird
toolchain build issues.
2019-04-17 23:16:16 +02:00
Andreas Kling
33920df299
AK: Try to use StringViews more for substrings and splitting.
2019-04-16 02:39:16 +02:00
Andreas Kling
26a06f3fcd
Kernel: More work towards POSIX SHM, also add ftruncate().
2019-04-09 01:10:00 +02:00
Andreas Kling
99f3cc26c3
Kernel+LibC: Add stubs for POSIX shared memory API.
...
Specifically shm_open() and shm_unlink(). This patch just adds stubs.
2019-04-08 23:44:12 +02:00
Andreas Kling
37ae00a4dd
Kernel+Userland: Add the rename() syscall along with a basic /bin/mv.
2019-04-07 23:35:26 +02:00
Andreas Kling
9de7a0daaf
AK: Fix problem when building i686-pc-serenity toolchain from scratch.
2019-04-05 03:58:40 +02:00
Andreas Kling
e19d38e742
LibC: Add some missing stuff in stdint.h for libstdc++.
2019-04-05 03:37:01 +02:00
Andreas Kling
96104b5524
Taskbar: More bringup work. We now see a basic window list.
2019-04-04 01:44:35 +02:00
Andreas Kling
3dc3754cde
Font: Clean up AK::MappedFile and use it for mapping font files.
2019-04-03 13:51:49 +02:00
Andreas Kling
17e02e7450
Move NetworkOrdered.h to AK/ since it's used in both kernel and userspace.
2019-04-02 20:04:54 +02:00
Andreas Kling
73f3e05ebb
Stopwatch: Print the result in decimal instead of hexadecimal.
2019-03-30 04:20:08 +01:00
Andreas Kling
0058da734e
Kernel: Add Inode::truncate(size).
...
- Use this to implement the O_TRUNC open flag.
- Fix creat() to pass O_CREAT | O_TRUNC | O_WRONLY.
- Make sure we truncate wherever appropriate.
2019-03-27 16:42:30 +01:00
Andreas Kling
1577217ce1
LibC: Let's remember that headers are in C.
2019-03-27 12:53:05 +01:00
Andreas Kling
23bb276fcd
LibC: Run constructors on process startup.
...
Cooperate with the compiler to generate and execute the _init_array list
of constructor functions on userspace program statup. This took two days
to get working, my goodness. :^)
2019-03-27 12:48:21 +01:00
Andreas Kling
f1a2cb0882
LibC: Fix fread() EOF behavior with ungetc().
2019-03-27 05:13:28 +01:00
Andreas Kling
e145344767
LibC: Remove the validate_mallocation() stuff since Binutils hates it.
2019-03-27 05:02:02 +01:00
Andreas Kling
baab9f4402
LibC: Implement atexit() and strtoul().
2019-03-27 01:55:39 +01:00
Andreas Kling
d1e55fb4d9
LibC: Add ungetc() and automatically flush streams on fclose().
2019-03-27 01:40:55 +01:00
Andreas Kling
0c2face7b0
LibC: Add creat(), execvp() resolution, and exec*() environment inheritance.
2019-03-27 01:39:13 +01:00
Andreas Kling
aef6030a80
LibC: Time-related POSIX compliance fixes.
2019-03-27 01:31:53 +01:00
Andreas Kling
f2773e05e5
LibC: fread() should return the number of elements (not bytes) read.
2019-03-26 00:10:58 +01:00
Andreas Kling
500df578fe
LibGUI+Kernel: Add a GLock class (userspace mutex.)
...
It's basically a userspace port of the kernel's Lock class.
Added gettid() and donate() syscalls to support the timeslice donation
feature we already enjoyed in the kernel.
2019-03-25 13:03:49 +01:00
Andreas Kling
31871557e4
LibC: Add ftruncate() stub.
2019-03-24 00:53:39 +01:00
Andreas Kling
e561ab1b0b
Kernel+LibC: Add a simple create_thread() syscall.
...
It takes two parameters, a function pointer for the entry function,
and a void* argument to be passed to that function on the new thread.
2019-03-23 22:59:08 +01:00
Andreas Kling
9dfcd95cd7
Use 64-bit integers inside Stopwatch to enable longer timings.
2019-03-21 13:41:36 +01:00
Andreas Kling
5708c12e24
LibC: Add PAGE_SIZE to limits.h
2019-03-21 13:31:27 +01:00
Andreas Kling
93a6681388
LibC: malloc() should use mmap() directly for allocations >= PAGE_SIZE.
...
This is a solid speedup on PNG loading, and basically everything else.
Once again I find a way to defer writing a better allocator for now. :^)
2019-03-21 13:29:20 +01:00
Andreas Kling
86e2348b74
Kernel+LibC: Don't crash upon traversal of large directories.
2019-03-20 18:31:12 +01:00
Andreas Kling
cdb82f6fbb
LibC: Fix bug in scanf() family where we'd capture invalid data.
2019-03-20 15:29:04 +01:00
Andreas Kling
9120b05a40
Rename DNSLookupServer => LookupServer.
2019-03-20 04:26:30 +01:00
Andreas Kling
696f9c5bc0
LibC: Let gethostbyname() handle IPv4 address as input.
...
It would be neat to do a reverse lookup too, but for now we just parse
the IPv4 address into a dword.
2019-03-20 03:37:05 +01:00
Andreas Kling
0e4a1936ca
LibC: Implement gethostbyname() by talking to the DNSLookupServer.
...
We now talk to the lookup server over a local socket and it does the lookup
on our behalf. Including some retry logic, which is nice, because it seems
like DNS requests disappear in the ether pretty damn often where I am.
2019-03-20 01:15:22 +01:00
Andreas Kling
b7ad35d040
Terminal: Enough compat work for Lynx to actually load web pages.
2019-03-14 18:33:21 +01:00
Andreas Kling
2c3cf22bc9
LibC: A whole bunch of compat work towards porting Lynx.
2019-03-14 15:18:15 +01:00
Andreas Kling
48590a0e51
LibC: Oops, rename getgrname() -> getgrnam().
2019-03-14 15:16:11 +01:00
Andreas Kling
68f3771e4f
LibC: Minor socket-related compat fixes.
2019-03-14 13:03:32 +01:00
Andreas Kling
7aba68d51c
Userland+LibC: Add a new little "tc" program for testing TCP.
...
Also added send() and recv() to LibC in support of this. They are just
wrappers around sendto() and recvfrom().
2019-03-13 17:33:40 +01:00
Andreas Kling
48431b3535
LibC: Add netinet/in.h
2019-03-13 15:09:54 +01:00
Andreas Kling
19a51132f5
Kernel: recvfrom() should treat the address arguments as outparams.
2019-03-13 14:47:21 +01:00
Andreas Kling
b59d588c04
Kernel: Start fleshing out an UDP implementation.
2019-03-13 14:22:27 +01:00
Andreas Kling
562663df7c
Add support for socket send/receive timeouts.
...
Only the receive timeout is hooked up yet. You can change the timeout by
calling setsockopt(..., SOL_SOCKET, SO_RCVTIMEO, ...).
Use this mechanism to make /bin/ping report timeouts.
2019-03-13 13:15:05 +01:00
Andreas Kling
cf250e1245
More work on IPv4 sockets and /bin/ping.
...
It's now actually possible to ping other hosts on the network! :^)
I've switched the "run" script over to starting QEMU with user networking
since that works better for my testing needs right now.
2019-03-13 03:26:01 +01:00
Andreas Kling
a7d5e9781a
Kernel+LibC+Userland: Yet more networking bringup hacking.
...
All ICMP sockets now receive all ICMP packets. All this buffering is gonna
need some limits and such.
2019-03-12 17:27:07 +01:00
Andreas Kling
a017a77442
Kernel+LibC+Userland: Start working on an IPv4 socket backend.
...
The first userland networking program will be "ping" :^)
2019-03-12 15:51:42 +01:00
Andreas Kling
8175d75432
LibC: Implement getlogin().
2019-03-10 03:15:36 +01:00