summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-10WindowServer: Show modal window's cursor over blocked windowsAndreas Kling
When a window is blocked by a modal window from the same application, we now prefer the modal window's cursor instead of the hovered window.
2020-11-10AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safeTom
This makes most operations thread safe, especially so that they can safely be used in the Kernel. This includes obtaining a strong reference from a weak reference, which now requires an explicit call to WeakPtr::strong_ref(). Another major change is that Weakable::make_weak_ref() may require the explicit target type. Previously we used reinterpret_cast in WeakPtr, assuming that it can be properly converted. But WeakPtr does not necessarily have the knowledge to be able to do this. Instead, we now ask the class itself to deliver a WeakPtr to the type that we want. Also, WeakLink is no longer specific to a target type. The reason for this is that we want to be able to safely convert e.g. WeakPtr<T> to WeakPtr<U>, and before this we just reinterpret_cast the internal WeakLink<T> to WeakLink<U>, which is a bold assumption that it would actually produce the correct code. Instead, WeakLink now operates on just a raw pointer and we only make those constructors/operators available if we can verify that it can be safely cast. In order to guarantee thread safety, we now use the least significant bit in the pointer for locking purposes. This also means that only properly aligned pointers can be used.
2020-11-10AK: Add RefPtrTraits to allow implementing custom null pointersTom
This adds the ability to implement custom null states that allow storing state in null pointers.
2020-11-10LaunchServer: Add hsp=/bin/HackStudio file association to configBrendan Coles
2020-11-10Base: remove unnecessary Game config files from /home/anon/.config/Brendan Coles
2020-11-10ntpquery: Add a '-a' flag that makes it use adjtimeNico Weber
With this, `ntpquery` can adjust the system time without making it jump. A fun activity with this in: 0. Boot 1. Run `su` 2. Run `ntpquery -a` to adjust the time offset after boot (usually around a second) 3. Keep running `ntpquery ; adjtime` to see how the offset behind NTP and the remaining adjtime both shrink. adjtime adjustment is large enough to make the time offset go down by a bit, but we currently lose time quickly enough that by the time adjtime is done, we've only corrected the clock about halfway, and not all the way to zero. Goto 2. So this isn't all that great yet, but I think it's good enough to think about turning this into a permanently running service next.
2020-11-10Userland: Add an "adjtime" utilityNico Weber
It's a thin userland wrapper around adjtime(2). It can be used to view current pending time adjustments, and root can use it to smoothly adjust the system time. As far as I can tell, other systems don't have a userland utility for this, but it seems useful. Useful enough that I'm adding it to the lagom build so I can use it on my linux box too :)
2020-11-10Kernel+LibC: Add adjtime(2)Nico Weber
Most systems (Linux, OpenBSD) adjust 0.5 ms per second, or 0.5 us per 1 ms tick. That is, the clock is sped up or slowed down by at most 0.05%. This means adjusting the clock by 1 s takes 2000 s, and the clock an be adjusted by at most 1.8 s per hour. FreeBSD adjusts 5 ms per second if the remaining time adjustment is >= 1 s (0.5%) , else it adjusts by 0.5 ms as well. This allows adjusting by (almost) 18 s per hour. Since Serenity OS can lose more than 22 s per hour (#3429), this picks an adjustment rate up to 1% for now. This allows us to adjust up to 36s per hour, which should be sufficient to adjust the clock fast enough to keep up with how much time the clock currently loses. Once we have a fancier NTP implementation that can adjust tick rate in addition to offset, we can think about reducing this. adjtime is a bit old-school and most current POSIX-y OSs instead implement adjtimex/ntp_adjtime, but a) we have to start somewhere b) ntp_adjtime() is a fairly gnarly API. OpenBSD's adjfreq looks like it might provide similar functionality with a nicer API. But before worrying about all this, it's probably a good idea to get to a place where the kernel APIs are (barely) good enough so that we can write an ntp service, and once we have that we should write a way to automatically evaluate how well it keeps the time adjusted, and only then should we add improvements ot the adjustment mechanism.
2020-11-10Userland: ls: Add `-d` / `--directory` flagBrendan Coles
2020-11-10LibC: Add POSIX1 minimum limits to limits.hBrendan Coles
2020-11-10js: Use new string formatting functionsLinus Groh
2020-11-10Breakout: Add simple menu and about dialog :^)Andreas Kling
2020-11-10Breakout: Set the window iconAndreas Kling
2020-11-10Breakout: Turn off double-bufferingAndreas Kling
2020-11-10Breakout: Change ball x velocity depending on where it hits paddleAndreas Kling
This makes the game less deterministic and more fun. The "physics" definitely feel a little goofy, and I'm sure they can be greatly improved, but still it's already better. :^)
2020-11-10Breakout: Stop paddle movement when resetting itAndreas Kling
2020-11-10Breakout: Use floating point coordinatesAndreas Kling
2020-11-10Tests: Add Kernel tests for unveil system callBrendan Coles
2020-11-10Userland: ls: Add `-o` and `-B` / `--ignore-backups` flagsBrendan Coles
* `-B`, --ignore-backups`: Do not list implied entries ending with ~ * `-o`, In long format, do not show group information
2020-11-10Userland: Basic statistics for pingmarprok
After ping is terminated, the min/avg/max time as well as information about the number of successful packets received are printed on the screen.
2020-11-10Base: Add ls man page documentationBrendan Coles
2020-11-10ls: Add -A flag to show dot files excluding implied . and .. directoriesBrendan Coles
2020-11-10HackStudio: Scroll embedded terminals to bottom upon command executionAndreas Kling
It was kinda annoying that you had to scroll down manually every time you started a new build while looking at some error in the scrollback.
2020-11-10LibVT: Add TerminalWidget::scroll_to_bottom() APIAndreas Kling
(And use this internally when scrolling to bottom on non-modifier keydown events.)
2020-11-10LibGUI: Limit the height of item text in IconViewAmusedNetwork
Set the max height of the text_rect to be the height difference between two icons. Calculate the number of text lines that can be displayed in this height, and display only that many.
2020-11-10TextEditor: Go-to-line now shows line in middle of view (#4008)Jack Byrne
2020-11-10Kernel: Prevent `unveil` returning ENOENT with cpath permissionsJesse Buhagiar
This addresses the issue first enountered in #3644. If a path is first unveiled with "c" permissions, we should NOT return ENOENT if the node does not exist on the disk, as the program will most likely be creating it at a later time.
2020-11-10IPv4Address: Unit testsLenny Maiorani
Problem: - There is no direct unit testing of the IPv4Address functionality which makes refactoring difficult. Solution: - Add unit tests to cover the current functionality of IPv4Address. This will allow future refactorings with confidence.
2020-11-09Ports: Add GNU indentBrendan Coles
2020-11-09AK: Add formatters for floating point numbers.asynts
2020-11-09AK: Rename new_out to out and new_warn to warn.asynts
2020-11-09AK: Remove out() and warn().asynts
2020-11-09Base: Add Breakout game to system menu (#4006)bcoles
2020-11-09Breakout: Use the pending new ball rect for brick collision testingAndreas Kling
Otherwise the ball will bounce one frame *after* hitting a brick.
2020-11-09Breakout: Add a very simple breakout game :^)Andreas Kling
Made with HackStudio! This needs some love to feel like a proper game, but the basics are here.
2020-11-09LibWeb: Add support for reflected boolean valuesLuke
Also throw in some missing reflected DOMString values
2020-11-09ls: print inodes in short output format when -i arg is suppliedBrendan Coles
2020-11-08LibDebug: Use move semantics when populating abbreviations mapAndreas Kling
2020-11-08LibDebug: Avoid copying AttributeSpecifications when iterating themAndreas Kling
2020-11-08UserspaceEmulator: Support the first two levels of CPUIDAndreas Kling
GCC uses these when deciding which memcpy implementation to use.
2020-11-08LibDebug: Shrink some of the high-volume data structuresAndreas Kling
We quickly allocate a *ton* of these when loading large executables.
2020-11-08AK: Use reference algorithms for LEB128 parsingAndreas Kling
This fixes a bug in signed LEB128 parsing (sign extension stage) which would sometimes cause debug info to look very strange.
2020-11-08LibGUI: Prevent multiple drag initiations while drag messages are passedAnotherTest
2020-11-08Spreadsheet: Add support for copying ranges of cells to other cellsAnotherTest
Now the entire range is copied to the area around the target cell, translating the current cursor to the target.
2020-11-08Spreadsheet: Update the view when using the cell editorAnotherTest
2020-11-08LibGUI+WindowServer: Make DragOperation hold a MimeData instanceAnotherTest
...instead of maybe bitmap + a single mime type and its corresponding data. This allows drag&drop operations to hold multiple different kinds of data, and the views/applications to choose between those. For instance, Spreadsheet can keep the structure of the dragged cells, and still provide text-only data to be passed to different unrelated editors.
2020-11-08LibIPC: Add support for passing around ByteBuffers and HashMap<K, V>AnotherTest
It should be noted that using a shared buffer should still be preferred over passing a raw ByteBuffer over the wire.
2020-11-08LibGfx: Add methods to serialise and deserialise a BitmapAnotherTest
Unlike `to_shared_buffer()` and co, these methods do *not* require extra metadata about the bitmap.
2020-11-08LibGfx: remove debug printfs from GIFLoaderPeter Nelson
2020-11-08LibGfx: add erroneous cases to GIF test suitePeter Nelson