menu: avoid starving other processes in menu_handle()
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 8 Apr 2011 09:44:57 +0000 (09:44 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 8 Apr 2011 09:44:57 +0000 (09:44 +0000)
commit6b99bcc45c4e6fb69c597b0f5fa9532b1db711cf
treee2ca11cc49d85641c432f4798079611ae54e3449
parentac85598df47d68e71ce45b9b0803b1d885c11084
menu: avoid starving other processes in menu_handle()

When CONFIG_MENU_SMOOTH is enabled the menu_handle() can run
indefinitely without explicitly releasing the CPU.

So, add a voluntary preemption point in menu_handle() to avoid
starvation of the other processes when the kernel preemption is not
enabled.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4838 38d2e660-2303-0410-9eaa-f027e97ec537
bertos/gui/menu.c