Commit graph

40 commits

Author SHA1 Message Date
Liam
db40a2f430 general: remove atomic signal and wait 2023-06-22 09:25:23 -04:00
Liam
08d81c9726 general: improve handling of system startup failure 2022-12-06 16:13:42 -05:00
Kelebek1
992af57f8d Make coretiming waiting more accurate 2022-08-02 01:01:54 -04:00
Fernando Sahmkow
1541f198eb Core/Common: Corrections to core timing and add critical priority. 2022-06-28 01:10:55 +02:00
Andrea Pappacoda
b2eb103829 chore: add missing SPDX tags
Follow-up to 2b87305d31
2022-04-28 18:24:11 +02:00
Merry
ae642bbff2 common: Replace lock_guard with scoped_lock 2022-04-07 19:30:55 +01:00
ReinUsesLisp
d2a084b683 common/thread: Fix data race in is_set
As report by tsan, Event::Set can write is_set while WaitFor and friends
are reading from it. To address this issue, make is_set an atomic.
2020-08-26 02:50:51 +00:00
Fernando Sahmkow
fb07639438 General: Tune the priority of main emulation threads so they have higher priority than less important helper threads. 2020-06-27 11:36:09 -04:00
Fernando Sahmkow
ab76c0e296 Tests: Add base tests to host timing 2020-06-18 16:29:17 -04:00
FearlessTobi
e89cbc93dd Address second part of review comments 2020-01-23 20:55:26 +01:00
fearlessTobi
b2f53cceb6 Input: UDP Client to provide motion and touch controls
An implementation of the cemuhook motion/touch protocol, this adds the
ability for users to connect several different devices to citra to send
direct motion and touch data to citra.

Co-Authored-By: jroweboy <jroweboy@gmail.com>
2020-01-23 20:55:26 +01:00
Lioncash
eb88e9d088 general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-01 12:53:47 -04:00
Lioncash
3fe8582363 common/thread: Remove unused functions
Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.

The function for setting the thread name is left, however, since it can
have debugging utility usages.
2019-03-29 13:26:21 -04:00
Lioncash
1eb9558dd8 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.
2018-11-21 21:47:08 -05:00
Lioncash
e5a57346ea common/thread: Initialize class member variables where applicable
Simplifies the constructor interfaces for Barrier and Event classes.
2018-11-21 21:45:01 -05:00
Lioncash
6459301aa3 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.
2018-11-21 21:42:33 -05:00
Lioncash
814e65334e 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.
2018-11-21 21:40:11 -05:00
Lioncash
c8c46d0278 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.
2018-11-21 21:37:11 -05:00
Weiyi Wang
dd7df52d63 common/thread: remove YieldCPU()
simply use the standard library yield()
2018-09-22 23:27:42 +02:00
fearlessTobi
1190ea6ddb Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
Lioncash
9d21769d88 common/thread: Remove unnecessary feature checking for thread_local
Every compiler we require already supports it.
2018-04-19 22:41:18 -04:00
wwylele
9d5a7fd3f7 Common::Event: add WaitUntil 2016-12-26 10:41:26 +02:00
Emmanuel Gil Peyrot
1138ec0d49 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.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
1e4a5da9f4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
628ed4376a Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
MerryMage
aecdc328a3 Thread: Make Barrier reusable 2016-04-14 13:59:58 +01:00
MerryMage
3b73cd6dd4 common/thread: Correct code style 2016-04-14 13:58:28 +01:00
Emmanuel Gil Peyrot
2a36edfd86 Common: Cleanup thread includes. 2015-06-28 00:36:53 +01:00
Yuri Kunde Schlesner
e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
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.
2015-04-16 17:55:30 -03:00
Yuri Kunde Schlesner
cd1fbfcf1b Add profiling infrastructure and widget 2015-03-01 21:47:13 -03:00
purpasmart96
ebfd831ccb License change 2014-12-20 21:20:24 -08:00
Yuri Kunde Schlesner
616d874443 New logging system 2014-12-13 01:59:52 -02:00
Emmanuel Gil Peyrot
f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated 2014-11-19 09:03:07 +00:00
Lioncash
1a8f466217 Remove extraneous semicolons 2014-11-18 08:27:16 -05:00
archshift
498d1a37f1 Removed common/std_xyz, instead using the std header 2014-09-07 14:31:07 -07:00
Lioncash
da6f24b374 Common: Move remaining C header includes over to their C++ equivalent 2014-08-17 13:54:06 -04:00
Lioncash
90e994471a Common: Move header guards over to pragma once
Also replaced C headers with the C++ equivalent ones
2014-08-17 13:45:55 -04:00
bunnei
de0a034a84 fixed project includes to use new directory structure 2014-04-08 20:15:08 -04:00
bunnei
63e46abdb8 got rid of 'src' folders in each sub-project 2014-04-08 19:25:03 -04:00
Renamed from src/common/src/thread.h (Browse further)