Commit Graph

27 Commits

Author SHA1 Message Date
Triang3l
63ff758049 [Threading] Android thread naming and other cleanup 2020-11-22 20:03:45 +03:00
Joel Linn
68cf47e245 [threading] Fix Fence for multiple waiting threads 2020-11-15 11:12:05 -06:00
Sandy Carter
e945a13957 [threading linux] Implement suspend count
Add suspend count to thread implementation.
Increment suspend count on suspend and decrement on resume.
Wait on suspend count to be decremented to 0.
Return suspend count on suspend and on resume before incr/decr.
Fix naming of resume suspend count to make clear that suspend count is
before incr/decr.
Add test.
2020-11-15 11:12:05 -06:00
Sandy Carter
c2de074d5c [threading linux] Implement Timer
Test Manual Reset and Synchronization timers single threaded.
Test Cancelling timers.
Test WaitMultiple.
Ignore real-time event 35 in .gdbinit which is used to signal timer.

Callbacks don't seem to be called so testing them is difficult.
2020-11-15 11:12:05 -06:00
Sandy Carter
4280a6451d [threading] Simplify and test Fence
Remove atomic boolean in fence. Variable signaled_ is already protected
by mutex.
Remove wait loop with single predicate wait protected with mutex.

Add Fence Signal and Wait tests
Test signaling without waiting.
Test signaling before waiting.
Test signaling twice before waiting.
Test synchronizing threads with fence.

Few REQUIRES were used to test as there are no return codes.
A failing test may hang indefinitely or cause a segfault which would still
register as a fail.
2020-11-15 11:12:05 -06:00
gibbed
3dc69c6033 [Base] Cleanup set thread name. 2020-04-13 12:57:14 -05:00
scribam
b6e7e66fbe Fix travis LINT 2017-09-20 23:29:39 +02:00
Doug Johnson
91cfd7f784 Add missing include of <functional> 2017-07-11 11:47:24 -06:00
Dr. Chat
3678a22c90 Use TLS to store the current thread. 2015-12-29 13:09:24 -08:00
Dr. Chat
42c657c40a Remove processor dependency on XThread for breakpoints 2015-12-29 12:32:47 -08:00
Ben Vanik
a86b3821f2 Adding thread handle to logging. 2015-08-29 20:49:26 -07:00
Ben Vanik
e6461f326c Some xb style cleanup. 2015-08-05 22:06:20 -07:00
Ben Vanik
cb701fcb7c Latest linter. 2015-08-01 04:08:59 -07:00
Dr. Chat
e7def962f3 Expose native thread id 2015-07-24 18:41:53 -05:00
Ben Vanik
edfa3f3fc0 Replacing the tick count timer with xplat abstraction (also better rate).
Fixes #346.
2015-07-19 10:11:54 -07:00
Ben Vanik
f520d3a2a4 Run with latest clang-format. 2015-07-15 22:44:30 -07:00
Ben Vanik
c3415e6332 Adding TLS abstraction. 2015-07-15 22:20:33 -07:00
Ben Vanik
fefaa31cd8 Switching a few types to their platform-agnostic versions. 2015-07-15 22:09:19 -07:00
Ben Vanik
99104a25a8 Fixing thread exit. 2015-07-15 18:01:17 -07:00
Ben Vanik
a6012b73f4 Switching audio system to platform-agnostic primitives. 2015-07-14 23:13:56 -07:00
Ben Vanik
345fe60da0 Switching over kernel objects to the platform-agnostic APIs.
Possibly some regressions here.
2015-07-14 22:44:45 -07:00
Ben Vanik
bd058feb39 Wait primitives. 2015-07-14 20:22:15 -07:00
Ben Vanik
bd490d5833 Threading primitives, in prep for removing Win32 from kernel/ and others. 2015-07-13 22:49:29 -07:00
Ben Vanik
d89bad7380 Removing uses of Sleep/SwitchToThread/etc. 2015-07-13 21:54:24 -07:00
Ben Vanik
8244409501 Refactoring to enable future time scaling, coordinated clocks, etc. 2015-05-26 22:20:58 -07:00
Ben Vanik
273b9939e1 Fixing some misc thread/audio stuff. 2015-05-25 00:58:43 -07:00
Ben Vanik
e3220f7ae6 Code cleanup: moving poly/ into xenia/base/ 2015-05-02 03:42:51 -07:00