Updates and fixes to support GCC for Linux
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a ThreadDispatch Policy to the EBus code
The ThreadDispatch Policy can be configured by authors of an EBusTraits to
invoke a callback function after an EBus has finished it's dispatching
mechanism on a specific thread.
It takes into account recursive calls as well and will only invoke the
PostDispatch callback after all callstack entries for the current thread
are cleared.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Clang build fix
The Traits type is dependent on the template parameter, therefore the compiler needs to be told that the ThreadDispatchPolicy is a type and not a value.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed DispatchLockGuard cxall in the TerrainWorldRendererComponent.cpp
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added EBusTrait for configuring the DispatchLockGuard
Removed the ThreadPolicy trait, now that the DispatchLockGuard for the
EBus Context can be configured.
Used the DispatchLockGuard template along with the
IsInDispatchThisThread function to determine when an EBus has finished
dispatching on thread and released it's Context Mutex.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Tweaked comment format for the IsInDispatch function
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed explicit GetContext call from ThreadDispatchTestBus.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Clang EBus Test fix for DispatchLockGuard trait
Due to the clang compiler evalating constants within templates at the time of declaration, the LocklessDispatch value supplied to the template was always false resulting in the LocklessDispatch feature always locking.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>