Hardware semaphore example code to show direct and indirect work mode

Based on CCSv4.2 TN_PDK 1.0.0.5, tested and passed on both TN simulator 0.3.5 and TN_EVM (C5)

This example should be simultaneously run on Core0 and Core1 .

The Core0 requested and took semaphore 10 in direct mode at first, then Core1 also requested semaphore 10 in indirect mode, the request of Core1 didn't respond at once but record in the request queue.
After waiting for some time (configurable), the Core0  released semaphore 10, it switched to Core1 to take semaphore 10 due to the next one who raised the request was Core1 in the request queue, the hardware semaphore module triggered event 16 (according to 6618 data sheet) in Core1 to notify that this core had taken the semaphore and can continue do the atomic operation.