µC/OS-III handles event posting from interrupts using two different methods: Direct and Deferred Post. The method used in the application is selected by changing the value of OS_CFG_ISR_POST_DEFERRED_EN
in os_cfg.h
. When set to DEF_DISABLED
, µC/OS-III uses the Direct Post Method and when set to DEF_ENABLED
, µC/OS-III uses the Deferred Post Method. Note that the Deferred Post method is currently DEPRECATED and will be removed in a future µC/OS-III release.
As far as application code and ISRs are concerned, these two methods are completely transparent. It is not necessary to change anything except the configuration value OS_CFG_ISR_POST_DEFERRED_EN
to switch between the two methods. Of course, changing the configuration constant will require recompiling the product and µC/OS-III.
Before explaining why to use one versus the other, let us review their differences.