Commit Graph

7 Commits

Author SHA1 Message Date
Prism Tutaj b44af549cf Merge remote-tracking branch 'bwr/linux_stack_walker' into canary
# Conflicts:
#	.gdbinit
2019-09-07 20:59:49 -05:00
Sandy Carter 5c20589acf [cpu linux] Implement stack walking
Implement stack walking using libunwind and libiberty.
These two libraries would be need dependencies.
The libunwind library is quite common on a linux system and libiberty is
part of the GNU compiler.
Add tests for stack_walker.
2019-08-24 22:57:08 +02:00
Sandy Carter 41ba1eb1c1 [threading linux] Implement Callback Queuing
Add thread local bool for alertable state.
Use real-time event interrupt to run callback.
Fix sleep duration from miliseconds (microseconds / 1000) to seconds in sleep
command.
Add note for future implementation.

Ignore real-time event 37 in .gdbinit which is used to signal callback.

Test AlertableSleep
Test Thread QueueUserCallback.
TODO: Test alerted wait result when using IO functions.
2019-08-13 16:50:28 -04:00
Sandy Carter 00f223e737 [threading linux] Implement suspendable pthreads
Use real-time event interrupt to communicate suspend in timely manner.
Use conditional_variable to implement suspend wait and resume trigger.

Ignore real-time event 36 in .gdbinit which is used to signal suspend.

Test suspending threads.
2019-08-13 16:50:28 -04:00
Sandy Carter 82cbb11ff2 [threading linux] Implement basic Thread function
Add Basic Tests on Threads
2019-08-13 16:50:28 -04:00
Sandy Carter fb3533ec45 [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.
2019-08-13 16:50:28 -04:00
Sandy Carter 8087b5a58b [threading] Implement Posix HighResolutionTimer
Implement HighResolutionTimer for Posix by using native timers.
Callbacks are triggered with realtime interrupts if they are supported.
Create an enum to track user-defined interrupts as well as an initializer and
handler to register these interrupts per thread.
Add test cases for timers for both single and multiple.
Fix Sleep function to continue sleeping if interrupted by system.
Add local .gdbinit to ignore signal 34 which is used by high res timer
2019-08-13 15:56:42 -04:00