Relinquishes the current thread's ownership of a critical section (shared critical resource). Once ownership is relinquished, access to the critical section is available to the next thread that requests it (using the EnterCriticalSection() function). If a thread has been waiting for access, it will be granted at this point.
LeaveCriticalSection() needs to be called once for each EnterCriticalSection() used.
Note: This function is process-based, not computer-based, and so will only prevent access to a critical section within a single process. This function only works between Cicode tasks within the same process.
The name of the critical section. The name needs to be entered in quotation marks.
This function does not return a value.
/* Request access to critical section, execute code and relinquish ownership of critical section. */
// critical code is placed here