diff options
author | inmarket <inmarket@ugfx.io> | 2017-08-16 16:49:02 +1000 |
---|---|---|
committer | inmarket <inmarket@ugfx.io> | 2017-08-16 16:49:02 +1000 |
commit | d7b083da1e3fbc9355422bc29470c387e88389d7 (patch) | |
tree | 5b21b55ae61e54fb1bdad40aaf0f590385176c02 /src/gos/gos_ecos.c | |
parent | 422e95becf719ab3dfc3e37d5fda1b6f37dd02fb (diff) | |
download | uGFX-d7b083da1e3fbc9355422bc29470c387e88389d7.tar.gz uGFX-d7b083da1e3fbc9355422bc29470c387e88389d7.tar.bz2 uGFX-d7b083da1e3fbc9355422bc29470c387e88389d7.zip |
Remove long obsoleted (and dubious) functions gfxSemCounter() and gfxSemCounterI()
Diffstat (limited to 'src/gos/gos_ecos.c')
-rw-r--r-- | src/gos/gos_ecos.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gos/gos_ecos.c b/src/gos/gos_ecos.c index f7e557ac..a55773d9 100644 --- a/src/gos/gos_ecos.c +++ b/src/gos/gos_ecos.c @@ -84,7 +84,7 @@ void gfxSemSignal(gfxSem *psem) cyg_semaphore_post(&psem->sem); else { cyg_scheduler_lock(); - if (gfxSemCounterI(psem) < psem->limit) + if (cyg_semaphore_peek(&psem->sem, &cnt) < psem->limit) cyg_semaphore_post(&psem->sem); cyg_scheduler_unlock(); } @@ -92,17 +92,10 @@ void gfxSemSignal(gfxSem *psem) void gfxSemSignalI(gfxSem *psem) { - if (psem->limit == MAX_SEMAPHORE_COUNT || gfxSemCounterI(psem) < psem->limit) + if (psem->limit == MAX_SEMAPHORE_COUNT || cyg_semaphore_peek(&psem->sem, &cnt) < psem->limit) cyg_semaphore_post(&psem->sem); } -semcount_t gfxSemCounterI(gfxSem *psem) { - semcount_t cnt; - - cyg_semaphore_peek(&psem->sem, &cnt); - return cnt; -} - gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_t prio, DECLARE_THREAD_FUNCTION((*fn),p), void *param) { gfxThreadHandle th; |