Lines Matching refs:g
322 add_routine (struct keymgr_atexit_list * g, in add_routine() argument
331 _keymgr_set_and_unlock_processwide_ptr (KEYMGR_ATEXIT_LIST, g); in add_routine()
335 s->next = g->l; in add_routine()
336 g->l = s; in add_routine()
337 result = _keymgr_set_and_unlock_processwide_ptr (KEYMGR_ATEXIT_LIST, g); in add_routine()
343 run_routines (struct keymgr_atexit_list *g, in run_routines() argument
348 struct atexit_routine_list * cur = g->l; in run_routines()
351 g->l = cur->next; in run_routines()
352 _keymgr_set_and_unlock_processwide_ptr (KEYMGR_ATEXIT_LIST, g); in run_routines()
367 g = _keymgr_get_and_lock_processwide_ptr (KEYMGR_ATEXIT_LIST); in run_routines()
368 if (! g) in run_routines()
371 return g; in run_routines()
382 struct keymgr_atexit_list *g; in cxa_atexit_wrapper() local
386 g = _keymgr_get_and_lock_processwide_ptr (KEYMGR_ATEXIT_LIST); in cxa_atexit_wrapper()
387 if (g) in cxa_atexit_wrapper()
389 prev_running = g->running_routines; in cxa_atexit_wrapper()
390 g->running_routines = 1; in cxa_atexit_wrapper()
391 base = g->l; in cxa_atexit_wrapper()
392 _keymgr_set_and_unlock_processwide_ptr (KEYMGR_ATEXIT_LIST, g); in cxa_atexit_wrapper()
400 if (g) in cxa_atexit_wrapper()
401 g = _keymgr_get_and_lock_processwide_ptr (KEYMGR_ATEXIT_LIST); in cxa_atexit_wrapper()
402 if (g) in cxa_atexit_wrapper()
403 g = run_routines (g, base); in cxa_atexit_wrapper()
404 if (g) in cxa_atexit_wrapper()
406 g->running_routines = prev_running; in cxa_atexit_wrapper()
407 _keymgr_set_and_unlock_processwide_ptr (KEYMGR_ATEXIT_LIST, g); in cxa_atexit_wrapper()
422 struct keymgr_atexit_list *g; in our_atexit() local
425 g = _keymgr_get_and_lock_processwide_ptr (KEYMGR_ATEXIT_LIST); in our_atexit()
426 if (! g || g->version != 0 || g->atexit_status != atexit_status_missing) in our_atexit()
429 prev_running = g->running_routines; in our_atexit()
430 g->running_routines = 1; in our_atexit()
431 g = run_routines (g, NULL); in our_atexit()
432 if (! g) in our_atexit()
434 g->running_routines = prev_running; in our_atexit()
435 _keymgr_set_and_unlock_processwide_ptr (KEYMGR_ATEXIT_LIST, g); in our_atexit()
449 struct keymgr_atexit_list *g = get_globals (); in atexit_common() local
451 if (! g) in atexit_common()
454 if (g->running_routines || g->atexit_status == atexit_status_missing) in atexit_common()
455 return add_routine (g, r); in atexit_common()
457 if (g->atexit_status >= atexit_status_working) in atexit_common()
462 cxa_atexit_p cxa_atexit = g->cxa_atexit_f; in atexit_common()
464 g); in atexit_common()
471 atexit_p atexit_f = g->atexit_f; in atexit_common()
473 g); in atexit_common()
481 cxa_atexit_p cxa_atexit = g->cxa_atexit_f; in atexit_common()
485 result = _keymgr_set_and_unlock_processwide_ptr (KEYMGR_ATEXIT_LIST, g); in atexit_common()