Age | Commit message (Collapse) | Author |
|
This is turning out really nice so far. :^)
|
|
|
|
This works just like NonnullRefPtr, except for NonnullOwnPtr's instead.
NonnullOwnPtrVector<T> inherits from Vector<NonnullOwnPtr<T>>, and adds some
comforts on top, like making accessors return T& so we can chase dots (.)
instead of arrows (->) :^)
|
|
In every case I found, we never wanted to support null entry values.
With NonnullOwnPtr, we can encode that at the type level. :^)
|
|
We don't allow null events in the event queue. :^)
|
|
This is just like OwnPtr (also single-owner), except it cannot be null.
NonnullOwnPtr is perfect as the return type of functions that never need to
return nullptr.
It's also useful as an argument type to encode the fact that the argument
must not be nullptr.
The make<Foo>() helper is changed to return NonnullOwnPtr<Foo>.
Note: You can move() out of a NonnullOwnPtr, and after that the object is
in an invalid state. Internally it will be a nullptr at this point, so we'll
still catch misuse, but the only thing that should be done in this state
is running the destructor. I've used consumable annotations to generate some
warnings when using a NonnullOwnPtr after moving from it, but these only
work when compiling with clang, so be aware of that.
|
|
|
|
|
|
|
|
This is like value() but with a fallback in case there's no value set.
|
|
Add a basic "save as" action to the TextEditor app, and make "save" fall
back to using "save as" if there's no name already set.
Fixes #282.
|
|
There was some leftover cruft from the times when PhysicalPage was allocated
using different allocators depending on lifetime.
|
|
Cached tooltip windows were preventing the automatic event loop shutdown.
It's not like we were gaining much by caching these anyway, since we only
cached the GWindow, not anything on the WindowServer side.
|
|
This behavior and API was extremely counter-intuitive since our default
behavior was for applications to never exit after you close all of their
windows.
Now that we exit the event loop by default when the very last GWindow is
deleted, we don't have to worry about this.
|
|
This behavior is the new opt-out default. If you don't want your app to exit
when the last GWindow is destroyed, call this:
- void GApplication::set_quit_set_quit_when_last_window_deleted(bool)
Also renamed "windows()" to "reified_windows" in GWindow.cpp to reflect that
it only contains GWindows that have a server-side representation. :^)
|
|
|
|
|
|
|
|
|
|
|
|
Use the new watch_file() mechanism to monitor the currently open directory
for changes and refresh the model when notified. This makes FileManager
automagically show newly added files. :^)
|
|
The syscall is quite simple:
int watch_file(const char* path, int path_length);
It returns a file descriptor referring to a "InodeWatcher" object in the
kernel. It becomes readable whenever something changes about the inode.
Currently this is implemented by hooking the "metadata dirty bit" in
Inode which isn't perfect, but it's a start. :^)
|
|
|
|
This way, we can change how the scheduler works without having to change Thread too.
|
|
When we used "make install" in the past, the "install" target would pull
in the library targets as dependencies, and everything got built that way.
Now that we use "install.sh" instead, we have to build things manually.
|
|
|
|
I was using this for a makeshift queue, but now there is AK::Queue.
|
|
This is very handy for the DebugLogStream implementation, among others. :^)
|
|
We were installing libraries into /Libraries/Root, rather than in /Root.
This made the ports system behave rather unpredictable, since I had old
versions of things in /Root and new versions of things in /Libraries/Root.
|
|
We've been using a per-directory "install.sh" for some time, so let's get
rid of the old way of doing things.
|
|
This was something I used during early kernel development to spam creation
of new processes to see if the kernel could handle it.
|
|
The "stddbg" stream was a cute idea but we never ended up using it in
practice, so let's simplify this and implement userspace dbgprintf() on top
of a simple dbgputch() syscall instead.
This makes debugging LibC startup a little bit easier. :^)
|
|
|
|
Restructure the makefile a little so it only builds objects once, and
then run them on make clean.
This is a little slower (since we're relinking tests each makeall), but
it also ensures that it will work.
|
|
The debug output was basically dominated by Ext2FS spam.
|
|
Add a trivial CSafeSyscall template that calls a callback until it stops
returning EINTR, and use it everywhere we use select() now.
Thanks to Andreas for the suggestion of using a template parameter for
the syscall function to invoke.
|
|
Check for EINTR before doing anything with the passed sets, otherwise we
zero them out which means a re-call with the same sets won't work.
|
|
Caught by valgrind's uninitialized access checks on the Vector unit test.
Yay for finding bugs with valgrind on the unit tests! :^)
|
|
Same as the RefPtr issue I just fixed. This makes it possible to assign a
NonnullRefPtr<Derived>&& to a NonnullRefPtr<Base>.
|
|
With the presence of signal handlers, it is possible that a thread might
be blocked multiple times. Picture for instance a signal handler using
read(), or wait() while the thread is already blocked elsewhere before
the handler is invoked.
To fix this, we turn m_blocker into a chain of handlers. Each block()
call now prepends to the list, and unblocking will only consider the
most recent (first) blocker in the chain.
Fixes #309
|
|
Makes checking for leaks more straightforward
|
|
To be more consistent with the rest of the codebase
|
|
Otherwise it's not possible to assign a RefPtr<Derived>&& to a RefPtr<Base>.
|
|
It's good to verify that complex objects can be moved nicely by Vector.
|
|
|
|
We were not actually running any of the unit tests, only getting a pointer
to them. Thankfully they all pass, even after we start running them. :^)
|
|
This makes it much harder to screw with an application while it's showing
a modal window, and matches what some other systems are doing. :^)
|
|
Added some FIXME's about correctness issues in nested event loop exiting.
|
|
This is very simple but already very useful. Now you're able to call to
dump_backtrace() from anywhere userspace to get a nice symbolicated
backtrace in the debugger output. :^)
|
|
Fixes #352.
|