feat: add SMALL_OPTI flag for very small added optimisations
This commit is contained in:
parent
7476ccc821
commit
3ad5dc1257
2
Makefile
2
Makefile
@ -20,7 +20,7 @@ check_targets=$(addprefix check_,${all_bins})
|
||||
src_dirs=$(sort $(dir $(wildcard ${src_dir}/**/)))
|
||||
includes=$(patsubst %,-I%,${src_dirs})
|
||||
|
||||
CFLAGS+=${includes} -march=native -fPIC
|
||||
CFLAGS+=${includes} -march=native -fPIC -DSMALL_OPTI
|
||||
LDFLAGS+=
|
||||
ifdef USE_PTHREAD
|
||||
LDFLAGS+=-lpthread
|
||||
|
@ -73,6 +73,11 @@ int thread_yield(void)
|
||||
if (TAILQ_EMPTY(&scheduler_fifo))
|
||||
return 0;
|
||||
|
||||
#ifdef SMALL_OPTI
|
||||
if (!IS_FINISHED(running) && !IS_WAITING(running) && !IS_MUTEX_WAITING(running))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (HAS_STATUS(running, MUTEX_LOCKING)) {
|
||||
if (running->mutex_prio > 0) {
|
||||
running->mutex_prio--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user