Commit Graph

27 Commits (fbc67a05637f3acb47f933066fb2e548f9d35d8c)

Author SHA1 Message Date
Lioncash 93f7677402 common/thread: Make Barrier's 'count' member non-const
While admirable as a means to ensure immutability, this has the
unfortunate downside of making the class non-movable. std::move cannot
actually perform a move operation if the provided operand has const data
members (std::move acts as an operation to "slide" resources out of an
object instance). Given Barrier contains move-only types such as
std::mutex, this can lead to confusing error messages if an object ever
contained a Barrier instance and said object was attempted to be moved.
Lioncash 756e773096 common/thread: Initialize class member variables where applicable
Simplifies the constructor interfaces for Barrier and Event classes.
Lioncash 02602afd10 common/thread: Group non-member functions together
Keeps the non-member interface in one spot instead of split into two
places, making it nicer to locate functions.
Lioncash d6583d68f6 common/thread: Remove SleepCurrentThread()
This is also unused and superceded by standard functionality. The
standard library provides std::this_thread::sleep_for(), which provides
a much more flexible interface, as different time units can be used with
it.
Lioncash 1d555fdd25 common/thread: Remove unused CurrentThreadId()
This is an old function that's no longer necessary. C++11 introduced
proper threading support to the language and a thread ID can be
retrieved via std::this_thread::get_id() if it's ever needed.
Weiyi Wang e0ce07aa7d common/thread: remove YieldCPU()
simply use the standard library yield()
fearlessTobi 63c2e32e20 Port from Citra: "Prefix all size_t with std::"
Lioncash b134e6afcf common/thread: Remove unnecessary feature checking for thread_local
Every compiler we require already supports it.
wwylele 2a069e76a5 Common::Event: add WaitUntil
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything.
MerryMage 3c710f9b10 Thread: Make Barrier reusable
MerryMage 8c50833445 common/thread: Correct code style
Emmanuel Gil Peyrot 2a36edfd86 Common: Cleanup thread includes.
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h
Yuri Kunde Schlesner 6402de9ae7 Common: thread.h cleanups
The helper classes are rendered obsolete by C++11 lambdas. Also made
formatting conform to our code style.
Yuri Kunde Schlesner cd1fbfcf1b Add profiling infrastructure and widget
purpasmart96 ebfd831ccb License change
Yuri Kunde Schlesner 616d874443 New logging system
Emmanuel Gil Peyrot f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated
Lioncash 1a8f466217 Remove extraneous semicolons
archshift 498d1a37f1 Removed common/std_xyz, instead using the std header
Lioncash da6f24b374 Common: Move remaining C header includes over to their C++ equivalent
Lioncash 90e994471a Common: Move header guards over to pragma once
Also replaced C headers with the C++ equivalent ones
bunnei de0a034a84 fixed project includes to use new directory structure
bunnei 63e46abdb8 got rid of 'src' folders in each sub-project