Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/fibril_sync.c

    r8619f25 rc51a7cd  
    4040#include <assert.h>
    4141
    42 static void optimize_execution_power(void)
    43 {
    44         /*
    45          * When waking up a worker fibril previously blocked in fibril
    46          * synchronization, chances are that there is an idle manager fibril
    47          * waiting for IPC, that could start executing the awakened worker
    48          * fibril right away. We try to detect this and bring the manager
    49          * fibril back to fruitful work.
    50          */
    51         if (atomic_get(&threads_in_ipc_wait) > 0)
    52                 ipc_poke();
    53 }
    54 
    5542void fibril_mutex_initialize(fibril_mutex_t *fm)
    5643{
     
    9784                list_remove(&f->link);
    9885                fibril_add_ready((fid_t) f);
    99                 optimize_execution_power();
    10086        }
    10187}
     
    166152                        fibril_add_ready((fid_t) f);
    167153                        frw->writers++;
    168                         optimize_execution_power();
    169154                        break;
    170155                } else {
     
    172157                        fibril_add_ready((fid_t) f);
    173158                        frw->readers++;
    174                         optimize_execution_power();
    175159                }
    176160        }
     
    216200                list_remove(&f->link);
    217201                fibril_add_ready((fid_t) f);
    218                 optimize_execution_power();
    219202                if (once)
    220203                        break;
Note: See TracChangeset for help on using the changeset viewer.