Beispiel #1
0
void
mtev_init_globals() {
    /* instead of just a cas, we lock.. this makes sure
     * no one leaves this function before the job is done.
     */
    mtev_spinlock_lock(&mtev_init_globals_lock);
    if(mtev_init_globals_once == 0) {
        mtev_memory_init();
        eventer_init_globals();
        eventer_jobq_init_globals();
        mtev_capabilities_init_globals();
        mtev_conf_init_globals();
        mtev_dso_init_globals();
        mtev_http_rest_init_globals();
        mtev_listener_init_globals();
        mtev_reverse_socket_init_globals();
        mtev_init_globals_once = 1;
    }
    mtev_spinlock_unlock(&mtev_init_globals_lock);
}
Beispiel #2
0
static inline void
spinlock_lock(struct locks_container *h) {
  mtev_spinlock_lock(&h->locks.hs_spinlock);
}