cyg_scheduler_start
Name: cyg_scheduler_start ( ) - start scheduler
Synopsis:
void cyg_scheduler_start
(
  void
)
Description: Start the system scheduler. You normally do not have to call this function as eCos will have called it by default.
Include: #include <cyg/kernel/kapi.h>
Returns: nothing
See Also: cyg_scheduler_lock, cyg_scheduler_safe_lock, cyg_scheduler_unlock, cyg_scheduler_read_lock

cyg_scheduler_lock
Name: cyg_scheduler_lock ( ) - lock scheduler
Synopsis:
void cyg_scheduler_lock
(
  void
)
Description: This will lock the scheduler. In other words, this will prevent the thread from being pre-empted by another thread. In order to enable thread switching again you must call cyg_scheduler_unlock the same number of times this function has been called.

Use this function rather than disabling interrupts to create atomic operations whenever possible. If possible, you should usemutexes where possible.

Include: #include <cyg/kernel/kapi.h>
Returns: nothing
See Also: cyg_scheduler_safe_lock, cyg_scheduler_unlock, cyg_scheduler_read_lock

cyg_scheduler_safe_lock
Name: cyg_scheduler_safe_lock ( ) - lock the scheduler if it's not already locked
Synopsis:
void cyg_scheduler_safe_lock
(
  void
)
Description: Lock the scheduler if it's not already locked. If the scheduler has already been locked once or multiple times this function has no effect on the lock count. If the lock count is 0 (i.e. the scheduler has not been locked) this will lock the scheduler and set the lock count to 1.
Include: #include <cyg/kernel/kapi.h>
Returns: nothing
See Also: cyg_scheduler_lock, cyg_scheduler_unlock, cyg_scheduler_read_lock

cyg_scheduler_unlock
Name: cyg_scheduler_unlock ( ) - unlock the scheduler
Synopsis:
void cyg_scheduler_unlock
(
  void
)
Description: This function will decrement the lock count. For every call to cyg_scheduler_lock there must be a call to cyg_scheduler_unlock in order to actually unlock the scheduler to enable thread switching again. If the scheduler is already unlocked the behavior is undefined.
Include: #include <cyg/kernel/kapi.h>
Returns: nothing
See Also: cyg_scheduler_lock, cyg_scheduler_safe_lock, cyg_scheduler_read_lock

cyg_scheduler_read_lock
Name: cyg_scheduler_read_lock ( ) - read scheduler lock count
Synopsis:
cyg_ucount32 cyg_scheduler_read_lock
(
  void
)
Description: This gets the current scheduler lock count. If the thread is is not locked this will return 0. If the lock count is N, the cyg_scheduler_unlock function will have to be called N times to enable context switching again.
Include: #include <cyg/kernel/kapi.h>
Returns: the current lock count
See Also: cyg_scheduler_lock, cyg_scheduler_safe_lock, cyg_scheduler_unlock