<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/Common/Thread.cpp, branch 2603</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>Remove unused imports</title>
<updated>2026-01-25T15:12:15+00:00</updated>
<author>
<name>Martino Fontana</name>
<email>tinozzo123@gmail.com</email>
</author>
<published>2026-01-23T20:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a14c88ba67a51b0a563a5fc800cd089e82ffacaf'/>
<id>a14c88ba67a51b0a563a5fc800cd089e82ffacaf</id>
<content type='text'>
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix building on OpenBSD</title>
<updated>2023-04-29T23:21:48+00:00</updated>
<author>
<name>Brad Smith</name>
<email>brad@comstyle.com</email>
</author>
<published>2023-04-29T23:21:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=29a8226ac5ce3504a60cfea71414105ef9f1e67c'/>
<id>29a8226ac5ce3504a60cfea71414105ef9f1e67c</id>
<content type='text'>
86c1f6e1e7e2abcc3f42e1182134e632b218b6d3 introduced code that had not
been build tested on OpenBSD.

https://bugs.dolphin-emu.org/issues/13241
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
86c1f6e1e7e2abcc3f42e1182134e632b218b6d3 introduced code that had not
been build tested on OpenBSD.

https://bugs.dolphin-emu.org/issues/13241
</pre>
</div>
</content>
</entry>
<entry>
<title>Jit: Don't use a second stack</title>
<updated>2023-02-28T19:29:46+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2023-01-01T19:18:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=86c1f6e1e7e2abcc3f42e1182134e632b218b6d3'/>
<id>86c1f6e1e7e2abcc3f42e1182134e632b218b6d3</id>
<content type='text'>
This second stack leads to JNI problems on Android, because ART fetches
the address and size of the original stack using pthread functions
(see GetThreadStack in art/runtime/thread.cc), and (presumably) treats
stack addresses outside of the original stack as invalid. (What I don't
understand is why some JNI operations on the CPU thread work fine
despite this but others don't.)

Instead of creating a second stack, let's borrow the approach ART uses:
Use pthread functions to find out the stack's address and size, then
install guard pages at an appropriate location. This lets us get rid
of a workaround we had in the MsgAlert function.

Because we're no longer choosing the stack size ourselves, I've made some
tweaks to where the put the guard pages. Previously we had a stack of
2 MiB and a safe zone of 512 KiB. We now accept stacks as small as 512 KiB
(used on macOS) and use a safe zone of 256 KiB. I feel like this should
be fine, but haven't done much testing beyond "it seems to work".

By the way, on Windows it was already the case that we didn't create
a second stack... But there was a bug in the implementation!
The code for protecting the stack has to run on the CPU thread, since
it's the CPU thread's stack we want to protect, but it was actually
running on EmuThread. This commit fixes that, since now this bug
matters on other operating systems too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This second stack leads to JNI problems on Android, because ART fetches
the address and size of the original stack using pthread functions
(see GetThreadStack in art/runtime/thread.cc), and (presumably) treats
stack addresses outside of the original stack as invalid. (What I don't
understand is why some JNI operations on the CPU thread work fine
despite this but others don't.)

Instead of creating a second stack, let's borrow the approach ART uses:
Use pthread functions to find out the stack's address and size, then
install guard pages at an appropriate location. This lets us get rid
of a workaround we had in the MsgAlert function.

Because we're no longer choosing the stack size ourselves, I've made some
tweaks to where the put the guard pages. Previously we had a stack of
2 MiB and a safe zone of 512 KiB. We now accept stacks as small as 512 KiB
(used on macOS) and use a safe zone of 256 KiB. I feel like this should
be fine, but haven't done much testing beyond "it seems to work".

By the way, on Windows it was already the case that we didn't create
a second stack... But there was a bug in the implementation!
The code for protecting the stack has to run on the CPU thread, since
it's the CPU thread's stack we want to protect, but it was actually
running on EmuThread. This commit fixes that, since now this bug
matters on other operating systems too.
</pre>
</div>
</content>
</entry>
<entry>
<title>Treewide: Adjust order of includes</title>
<updated>2021-12-10T22:49:57+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2021-12-10T02:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=20257634209dba85d2cd51ad42e660090a5224e6'/>
<id>20257634209dba85d2cd51ad42e660090a5224e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: convert GPLv2+ license info to SPDX tags</title>
<updated>2021-07-05T02:35:56+00:00</updated>
<author>
<name>Pierre Bourdon</name>
<email>delroth@gmail.com</email>
</author>
<published>2021-07-05T01:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e149ad4f0a9874f354221a7fc76d8f1841e47808'/>
<id>e149ad4f0a9874f354221a7fc76d8f1841e47808</id>
<content type='text'>
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NetBSD support</title>
<updated>2020-12-15T01:34:25+00:00</updated>
<author>
<name>David Carlier</name>
<email>devnexen@gmail.com</email>
</author>
<published>2020-12-04T16:09:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=2c355b81f20fe0d40ac825375073d21b211732b9'/>
<id>2c355b81f20fe0d40ac825375073d21b211732b9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>windows: additionally set thread name via SetThreadDescription</title>
<updated>2020-08-23T00:22:07+00:00</updated>
<author>
<name>Shawn Hoffman</name>
<email>godisgovernment@gmail.com</email>
</author>
<published>2020-08-22T08:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a769dff1d07eadfbf26d3f18043aa3ecdfc97482'/>
<id>a769dff1d07eadfbf26d3f18043aa3ecdfc97482</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix various instances of -1 being assigned to unsigned types</title>
<updated>2017-06-08T02:52:07+00:00</updated>
<author>
<name>Shawn Hoffman</name>
<email>godisgovernment@gmail.com</email>
</author>
<published>2017-06-07T11:16:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e1a3e41bf33bf6a366760ede17c2e3bd2b106116'/>
<id>e1a3e41bf33bf6a366760ede17c2e3bd2b106116</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial support for Haiku.</title>
<updated>2017-03-28T03:46:19+00:00</updated>
<author>
<name>Augustin Cavalier</name>
<email>waddlesplash@gmail.com</email>
</author>
<published>2017-02-22T17:21:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=0831dad467374f11256b5e63ca66b9dff5bf2463'/>
<id>0831dad467374f11256b5e63ca66b9dff5bf2463</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add includes for building on Windows without PCH</title>
<updated>2017-01-23T09:37:41+00:00</updated>
<author>
<name>Michael Maltese</name>
<email>michaeljosephmaltese@gmail.com</email>
</author>
<published>2017-01-23T07:08:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=713ec5ffd526aa5c783e4c6a13bcc45c453e2c10'/>
<id>713ec5ffd526aa5c783e4c6a13bcc45c453e2c10</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
