summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-01-01LibELF: Re-organize ELFDynamicObject::load and add PLT trampolineAndrew Kaster
ELFDynamicObject::load looks a lot better with all the steps re-organized into helpers. Add plt_trampoline.S to handle PLT fixups for lazy loading. Add the needed trampoline-trampolines in ELFDynamicObject to get to the proper relocations and to return the symbol back to the assembly method to call into from the PLT once we return back to user code.
2020-01-01LibELF: Call DT_INIT method now that startfiles are correct for DSOsAndrew Kaster
We weren't calling the method here before because it was ill-formed. No start files meant that we got the front half of the init section but not the back half (no 'ret' in _init!). Now that we have the proper crtbeginS and crtendS files from libgcc to help us out, we can assume that DSOs will have the proper _init method defined.
2020-01-01LibVT: fix pixel size calculations in terminal_did_resizejoshua stein
The scrollbar width must be factored in, and one too many m_line_spacing were being factored into the height. These caused an initial terminal opening in 80x25 to get resized right away and shrunk down to 77x24.
2020-01-01AK: Move the userspace SharedBuffer from LibC to AKAndreas Kling
This always felt out-of-place in LibC.
2020-01-01LibC: Use LibELF in dlfcn.cpp to dynamically load librariesAndrew Kaster
2020-01-01LibELF: Add ELFDynamicObject to dynamically load libariesAndrew Kaster
This patch also adds some missing relocation defines to exec_elf.h, and a few helper classes/methods to ELFImage so that we can use it for our dynamically loaded libs and not just main program images from the kernel :)
2020-01-01LibELF: Replace kprintf's in ELFImage.cpp with dbgprintfAndrew Kaster
This lets us use the class in userspace
2020-01-01LibC: Move __cxa_finalize and __cxa_atexit code to their own fileAndrew Kaster
These guys aren't really related to initializing the C runtime, so move them to a new fancy file named C++ abi. Or rather, cxxabi :)
2020-01-01LibGUI: Close and cancel GDialog on escapeConrad Pankoff
This is a small usability enhancement. If you press escape with a GDialog focused, it will now return its "Cancel" status.
2019-12-30Kernel: Also add a process boosting mechanismAndreas Kling
Let's also have set_process_boost() for giving all threads in a process the same boost.
2019-12-30Kernel: Add a basic thread boosting mechanismAndreas Kling
This patch introduces a syscall: int set_thread_boost(int tid, int amount) You can use this to add a permanent boost value to the effective thread priority of any thread with your UID (or any thread in the system if you are the superuser.) This is quite crude, but opens up some interesting opportunities. :^)
2019-12-30Kernel: Refactor scheduler to use dynamic thread prioritiesAndreas Kling
Threads now have numeric priorities with a base priority in the 1-99 range. Whenever a runnable thread is *not* scheduled, its effective priority is incremented by 1. This is tracked in Thread::m_extra_priority. The effective priority of a thread is m_priority + m_extra_priority. When a runnable thread *is* scheduled, its m_extra_priority is reset to zero and the effective priority returns to base. This means that lower-priority threads will always eventually get scheduled to run, once its effective priority becomes high enough to exceed the base priority of threads "above" it. The previous values for ThreadPriority (Low, Normal and High) are now replaced as follows: Low -> 10 Normal -> 30 High -> 50 In other words, it will take 20 ticks for a "Low" priority thread to get to "Normal" effective priority, and another 20 to reach "High". This is not perfect, and I've used some quite naive data structures, but I think the mechanism will allow us to build various new and interesting optimizations, and we can figure out better data structures later on. :^)
2019-12-30LibHTML: Ignore all CSS rules starting with "@" for nowAndreas Kling
2019-12-30LibCore: Use JsonObject::get_ptr() in CProcessStatisticsReaderAndreas Kling
This removes a bunch of JsonValue copying from the hot path in thread statistics fetching. Also pre-size the thread statistics vector since we know the final size up front. :^)
2019-12-30LibDraw: Store glyph spacing information in the fonts headersTibor Nagy
2019-12-30LibIPC: Let's start building custom message codecs for LibIPCAndreas Kling
Instead of using ByteBuffer (which always malloc() their storage) for IPC message encoding, we now use a Vector<u8, 1024>, which means that messages smaller than 1 KB avoid heap allocation entirely.
2019-12-30LibGUI: Call GWidget::resize_event() before doing widget layoutAndreas Kling
The widget layout system currently works by having layouts size the children of a widgets. The children then get resize events, giving them a chance to lay out their own children, etc. In keeping with this, we need to handle the resize event before calling do_layout() in a widget, since the resize event handler may do things that end up affecting the layout, but layout should not affect the resize event since the event comes from the widget parent, not itself.
2019-12-29LibGUI: Relayout GTextEditor on font changeAndreas Kling
Fixes #941.
2019-12-29LibCore+LibGUI: Don't fire timers in non-visible windows by defaultAndreas Kling
LibCore timers now have a TimerShouldFireWhenNotVisible flag which is set to "No" by default. If "No", the timer will not be fired by the event loop if it's within a CObject tree whose nearest GWindow ancestor is currently not visible for timer purposes. (Specificially, this means that the window is either minimized or fully occluded, and so does not want to fire timers just to update the UI.) This is another nice step towards a calm and serene operating system.
2019-12-29LibDraw: Fix text rendering in progress barsAndreas Kling
2019-12-29Kernel+SystemMonitor: Expose amount of per-process clean inode memoryAndreas Kling
This is memory that's loaded from an inode (file) but not modified in memory, so still identical to what's on disk. This kind of memory can be freed and reloaded transparently from disk if needed.
2019-12-29Kernel+SystemMonitor: Expose amount of per-process dirty private memoryAndreas Kling
Dirty private memory is all memory in non-inode-backed mappings that's process-private, meaning it's not shared with any other process. This patch exposes that number via SystemMonitor, giving us an idea of how much memory each process is responsible for all on its own.
2019-12-29LibHTML: RenderingContext should keep the Palette aliveAndreas Kling
We were lugging around a reference to a temporary here.
2019-12-29LibDraw+LibGUI: Allow changing individual colors in a PaletteAndreas Kling
Palette is now a value wrapper around a NonnullRefPtr<PaletteImpl>. A new function, set_color(ColorRole, Color) implements a simple copy-on-write mechanism so that we're sharing the PaletteImpl in the common case, but allowing you to create custom palettes if you like, by getting a GWidget's palette, modifying it, and then assigning the modified palette to the widget via GWidget::set_palette(). Use this to make PaintBrush show its palette colors once again. Fixes #943.
2019-12-28LibHTML: Add missing flock to Makefile (thanks jcs)Andreas Kling
2019-12-28Build: Fix missing IPC dependency for LibHTMLStefano Cristiano
2019-12-28Build: wrap make invocations with flock(1)joshua stein
Lock each directory before entering it so when using -j, the same dependency isn't built more than once at a time. This doesn't get full -j parallelism though, since one make child will be sitting idle waiting for flock to receive its lock and continue making (which should then do nothing since it will have been built already). Unfortunately there's not much that can be done to fix that since it can't proceed until its dependency is built by another make process.
2019-12-27LibC: implement fgetpos and fsetposPaweł Cholewa
They're just "front ends" for ftell and fseek, but they do their job. Fixes #913
2019-12-27LibC+ping: Let's use the traditional timersub() et al prototypesAndreas Kling
This also fixes the build, since ping.cpp already had a timersub().
2019-12-27GListView: Fix for theme support. We have to use theme colors.Hüseyin ASLITÜRK
2019-12-27LibC: Add timeval operationsMauri de Souza Nunes
This commit add macros for the timeval operations timeradd, timersub, timercmp, timerisset, timerclear.
2019-12-27LibC: Remove some functions we had two ofAndreas Kling
2019-12-27LibDraw: Remove redundant Rect copy constructorAndreas Kling
2019-12-27LibPthread: Log debug info to debug console instead of stdout (#931)Valtteri Koskivuori
2019-12-27WindowServer: Use the system theme for the fallback window backgroundAndreas Kling
When filling in some missing part of a window (typically happens during interactive window resize) we now use the ColorRole::Background from the system theme palette instead of expecting the clients to send us the same information when creating windows.
2019-12-27WindowServer+LibGUI: Mark window bitmaps volatile in occluded windowsAndreas Kling
WindowServer now tracks whether windows are occluded (meaning that they are completely covered by one or more opaque windows sitting above them.) This state is communicated to the windows via WindowStateChanged messages, which then allow GWindow to mark its backing store volatile. This reduces the effective memory impact of windows that are not at all visible to the user. Very cool. :^)
2019-12-27LibCore: Allow LibCore to be compiled on macOS hostStefano Cristiano
Compiling LibCore on macOS is needed if one wants to compile host tools
(like IPCCompiler) on a non Linux host.
These changes could be possibly reverted once "event loop" functionality
and "base library" (Vector, String etc.) will be split in two separate libraries, updating all relevant projects.
2019-12-27LibCore: Fix errors when compiling LibCore using clang instead of gccStefano Cristiano
2019-12-27LibGUI: Remove bitrotted automatic keybinds featureAndreas Kling
This feature hasn't been working at all for several months, so let's just remove it and simplify GWindow event handling.
2019-12-27LibDraw: Add draw_ellipse_intersecting functionShannon Booth
This functon will draw an ellipse which is intersecting the corners of the rect given. It is a very naive implementation, taking 200 samples of points around the ellipse, and drawing straight lines between each of these points. The ellipses look good enough to me though!
2019-12-26LibGUI: Use NeverDestroyed<T> for the global GWindow tablesAndreas Kling
We don't need these to be destroyed on exit, since that would race with the destruction of static global RefPtr<GWindow>'s. Fixes #900.
2019-12-26PaintBrush: Add a "rectangle tool"Shannon Booth
Fill, line, and gradient modes initially supported :^)
2019-12-26LibDraw: Add dx/dy_relative_to() helper functions for PointsShannon Booth
2019-12-26LibGUI+WindowServer: Mark minimized window backing stores as volatileAndreas Kling
WindowServer will now send out a WindowStateChanged message to clients when one of their windows is minimized. This is then forwarded to the GWindow, which will try to mark its underlying window backing store as volatile. This allows the kernel to steal the memory used by minimized windows in case it starts running low. Very cool! :^)
2019-12-26LibC: Oops x2, we can't use "bool" in stdlib.h eitherAndreas Kling
2019-12-26LibC: Oops, we can't use [[nodiscard]] when this is included from CAndreas Kling
2019-12-26LibHTML: Remove fixed FIXMEShannon Booth
2019-12-26LibC: Implement tmpfile()Shannon Booth
2019-12-26LibC: Use shared functon to generate unique filenamesShannon Booth
Move some dupliated code into __generate_unique_filename()
2019-12-26LibDraw: Add MenuBaseText and MenuSelectionText color rolesAndreas Kling
This allows the very aesthetic "Hotdog Stand" theme to have quite reasonable looking menus.