Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: fll mbed-rtos mbed
Diff: fll.cpp
- Revision:
- 4:9ee673ca05ad
- Parent:
- 3:edbf31a8589f
- Child:
- 5:130721ce29f7
--- a/fll.cpp Sat Feb 14 06:39:14 2015 +0000
+++ b/fll.cpp Sat Feb 14 06:49:42 2015 +0000
@@ -55,14 +55,16 @@
mutex = mut;
}
-// 何ミリ秒かごとに呼ばれる
void Sink::run()
{
button_t *btn;
- for (int i = 0; i < 8; i++) { // FIXME: 8?
+ while(1) {
mutex->lock();
btn = mail_box->alloc();
- if(!btn) break;
+ if(!btn) {
+ mutex->unlock();
+ continue;
+ }
*btn = source->await();
mail_box->put(btn);
mutex->unlock();
