summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-27E1000NetworkAdapter: Use dbg() instead of dbgprintf()Liav A
2020-02-27LoopbackAdapter: Use dbg() instead of dbgprintf()Liav A
2020-02-27IPv4Socket: Use dbg() instead of dbgprintf()Liav A
2020-02-27DMIDecoder: Use dbg() instead of dbgprintf()Liav A
2020-02-27Kernel: Run clang-format on DMIDecoder header fileLiav A
2020-02-27Kernel: Don't use references or pointers to physical addressesLiav A
Now the DMIDecoder code is more safer, because we don't use raw pointers or references to objects or data that are located in the physical address space, so an accidental dereference cannon happen easily. Instead, we use the PhysicalAddress class to represent those addresses. Also, the initializer_parser() method is simplified.
2020-02-27Toolchain: Add x86_64 cross compiler build scriptJesse Buhagiar
2020-02-27Build: Use ccache if it's available (#1315)Alexander F. Rødseth
2020-02-27Kernel: Always disable interrupts in do_killpg()Andreas Kling
Will caught an assertion when running "kill 9999999999999" :^)
2020-02-27Kernel: Ignore signals sent to threadless (zombie) processesAndreas Kling
If a process doesn't have any threads left, it's in a zombie state and we can't meaningfully send signals to it. So just ignore them. Fixes #1313.
2020-02-27Kernel: Fix the gettid syscallCristian-Bogdan SIRB
syscall_handler was not actually updating the value in regs->eax, so the gettid() was always returning 85: the value of regs->eax was not actually updated, and it remained the one from Userland (the value of SC_gettid). The syscall_handler was modified to actually get a pointer to RegisterState, so any changes to it will actually be saved. NOTE: This was actually more of a compiler optimization: On the SC_gettid flow, we saved in regs.eax the return value of sys$gettid(), but the compiler discarded it, since it followed a return. On a normal flow, the value of regs.eax was reused in tracer->did_syscall, so the compiler actually updated the value.
2020-02-27Kernel: Don't allow profiling a dead processAndreas Kling
Work towards #1313.
2020-02-27Kernel: Don't blindly dereference Process::executable()Andreas Kling
When setting up profiling, don't assume that the profiled process has a valid executable.
2020-02-27ps: Don't assert when coming across a zombie processAndreas Kling
Fixes #1278.
2020-02-27Piano: New timing system and zoomable piano rollWilliam McPherson
This patch allows roll notes to be of different sizes. This necessitates a new internal representation of time. BPM and time signatures are mostly implemented but not exposed. Roll notes are now sample-accurate and the grid is aligned to 60 BPM 4/4. The roll is divided by the time signature raised to some power of 2, giving the musical divisions of (in the case of 4/4) 16, 32, 64 etc. Before, our timing was derived from the buffer size and we relied on that to implement delay. Delay has been rewritten to be sample-granular. It's now exposed as the proper "divisions of a beat". Something to be wary of is that the last buffer in the loop is also used for the start of the next loop. In other words, we loop mid-buffer. This means we write WAVs with a tiny bit of silence due to breaking the loop after filling half a buffer. The data structure for the roll is an array of SinglyLinkedLists of RollNotes. Separating by pitch (via the array layout) makes insertion much simpler and faster. Using sorted lists (and thus SinglyLinkedListIterators) to do lookups is very quick as you know the sample of the next note and can just compare it to the current sample. I implemented this with HashMaps and the cost of lookups was abysmal. I also tried a single SinglyLinkedList and the insertion code got even more complicated than it already is.
2020-02-27WavLoader: Add missing AK/OwnPtr.h includeWilliam McPherson
2020-02-27AK: Expose SinglyLinkedListIterator constructorWilliam McPherson
This commit replaces SinglyLinkedListIterator::universal_end() with an empty SinglyLinkedListIterator(). Piano needs this in order to initialize a member array of iterators without 84 lines of universal_end().
2020-02-27Kernel: Fix ASSERTION failed in join_thread syscallCristian-Bogdan SIRB
set_interrupted_by_death was never called whenever a thread that had a joiner died, so the joiner remained with the joinee pointer there, resulting in an assertion fail in JoinBlocker: m_joinee pointed to a freed task, filled with garbage. Thread::current->m_joinee may not be valid after the unblock Properly return the joinee exit value to the joiner thread.
2020-02-27Kernel: Don't assert on sys$kill() with pid=INT32_MINAndreas Kling
On 32-bit platforms, INT32_MIN == -INT32_MIN, so we can't expect this to always work: if (pid < 0) positive_pid = -pid; // may still be negative! This happens because the -INT32_MIN expression becomes a long and is then truncated back to an int. Fixes #1312.
2020-02-27Ports: Update the C-ray renderer portValtteri Koskivuori
2020-02-27DisplayProperties: Do not assert on trying to select unset wallpaperTibor Nagy
When wallpapers are not present in WindowServer.ini, don't try to select them in the wallpapers list.
2020-02-26Kernel: Disallow assigning a TTY to an arbitrary process group IDAndreas Kling
It was possible to send signals to processes that you were normally not allowed to send signals to, by calling ioctl(tty, TIOCSPGRP, targetpid) and then generating one of the TTY-related signals on the calling process's TTY (e.g by pressing ^C, ^Z, etc.)
2020-02-26Kernel: Remove unused artifacts of the Custody cacheAndreas Kling
We'll probably want some kind of Custody caching in the future, but as it's not used at the moment, let's simplify things a bit.
2020-02-26Kernel: Sanitize memory coming in/out of the slab allocatorAndreas Kling
We were using SANITIZE_KMALLOC which was never defined in this .cpp file, oops. Now we actually scrub on slab_alloc() and slab_dealloc().
2020-02-26CircularQueue: Move construct a T object instead of copy constructing ithowar6hill
2020-02-26Kernel: Allow process with multiple threads to call exec and exitCristian-Bogdan SIRB
This allows a process wich has more than 1 thread to call exec, even from a thread. This kills all the other threads, but it won't wait for them to finish, just makes sure that they are not in a running/runable state. In the case where a thread does exec, the new program PID will be the thread TID, to keep the PID == TID in the new process. This introduces a new function inside the Process class, kill_threads_except_self which is called on exit() too (exit with multiple threads wasn't properly working either). Inside the Lock class, there is the need for a new function, clear_waiters, which removes all the waiters from the Process::big_lock. This is needed since after a exit/exec, there should be no other threads waiting for this lock, the threads should be simply killed. Only queued threads should wait for this lock at this point, since blocked threads are handled in set_should_die.
2020-02-26Meta: Claim copyright on `DisplayProperties` filesJesse Buhagiar
If anyone's machine blows up setting their wallpaper, they know to blame me and not AK :P
2020-02-26LibCore: Allow ConfigFile::read_num_entry to handle negative numbersJesse Buhagiar
Previously, this function was using `AK::String::to_uint()`, which is wrong considering the function returns type `int`. This also means that configuration files would revert to the default value on negative values.
2020-02-26Minesweeper: Perform sanity check on configuration (#1300)Jesse
This addresses the issue found in #1261. Previously we weren't doing any form of sanity checking on the values in the configuration file, meaning that a user could input a ridiculous number of mines such that the number of mines is larger than the number of squares on the field.
2020-02-26DateTime: Fix a typohowar6hill
2020-02-25LibGUI: Mouse events didn't hit table headers when vertically scrolledAndreas Kling
Only take the horizontal scroll into account when hit testing the table view headers.
2020-02-25SystemMonitor: Add pagemap visualization for VM regionsAndreas Kling
This patch adds a new column to the per-process memory regions view in SystemMonitor. It's a scaled view of the underlying pagemap of a region that tells you which chunks of the region are resident/null/zero.
2020-02-25ProcFS: Expose the physical page map of each region in /proc/PID/vmAndreas Kling
You can now see the state of each underlying physical page slot in a VM region.
2020-02-25LibM: Implement floating point variants of various math functionsValtteri Koskivuori
2020-02-25Terminal: Open settings as a modal windowTibor Nagy
To prevent the settings window from getting orphaned when someone closes the main window behind it.
2020-02-25Snake: Persist high scoreTibor Nagy
2020-02-25Build: Only look at SUBDIRS with Makefilesjoshua stein
If a directory is renamed or deleted before 'make clean', git will delete the Makefile but leave all of the object and dependency files around. When make would try to recurse into that directory from the wildcard, it would error out since there is no Makefile.
2020-02-25Terminal: Don't set an initial command_to_executejoshua stein
Otherwise we end up executing "/bin/Shell -c /bin/Shell" on a normal launch. With a null command_to_execute, we'll just execute /bin/Shell
2020-02-25Shell: Don't pass nonsense options to waitpid()Andreas Kling
I had these options confused with the options for waitid()
2020-02-25LibGUI: Fix ColumnsView.cpp buildAndreas Kling
2020-02-25LibGUI: Make descendants of AbstractView define their own select_all() (#1201)DAlperin
AbstractView does not know which column it's displaying which makes it impossible to implement the select_all functionality up there. Now descendants override the pure virtual select_all method and implement it themselves.
2020-02-25AK: Have AK/kmalloc.h #include <new> on other platformsAndreas Kling
This should make stuff like placement new work correctly when building outside of Serenity. This stuff is a bit delicate due to the weirdly staged toolchain build at the moment. Hopefully we can unify this stuff in the future.
2020-02-25AK: Provide a ptr_hash(const void*) overloadAndreas Kling
2020-02-25SoundPlayer: Cast Audio::Sample to float for fabsf()joshua stein
2020-02-25AK: Add ptr_hash to use int_hash or u64_hash depending on pointer sizejoshua stein
2020-02-25LibGfx: SystemTheme is a struct, not a classjoshua stein
SystemTheme.h:81:1: error: 'SystemTheme' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI
2020-02-25AK: Some more int => size_t in BitmapAndreas Kling
2020-02-25AK: Make Queue use size_t for its sizeAndreas Kling
2020-02-25AK: Make Vector use size_t for its size and capacityAndreas Kling
2020-02-25LibGUI: Actually store the column in MultiView::set_model_column()Andreas Kling
We were only forwarding the value to the subviews, but not storing it in m_model_column. This would cause MultiView::model_column() to return the wrong value. Thanks to Daniel Bos for spotting this! :^)