|
|
@ -22,13 +22,15 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
extern _Atomic uint64_t admissions_control_admitted;
|
|
|
|
extern _Atomic uint64_t admissions_control_admitted;
|
|
|
|
extern uint64_t admissions_control_capacity;
|
|
|
|
extern uint64_t admissions_control_capacity;
|
|
|
|
|
|
|
|
extern const double admissions_control_overhead;
|
|
|
|
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
static inline void
|
|
|
|
admissions_control_initialize()
|
|
|
|
admissions_control_initialize()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef ADMISSIONS_CONTROL
|
|
|
|
#ifdef ADMISSIONS_CONTROL
|
|
|
|
atomic_init(&admissions_control_admitted, 0);
|
|
|
|
atomic_init(&admissions_control_admitted, 0);
|
|
|
|
admissions_control_capacity = runtime_worker_threads_count * ADMISSIONS_CONTROL_GRANULARITY;
|
|
|
|
admissions_control_capacity = runtime_worker_threads_count * ADMISSIONS_CONTROL_GRANULARITY
|
|
|
|
|
|
|
|
* ((double)1.0 - admissions_control_overhead);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|