mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
- Use an array of init functions to be used in a for loop in our
initialization routine.
This commit is contained in:
parent
4822f32850
commit
3130f09161
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96179
@ -95,6 +95,13 @@ static struct atm_time atm_compactimer = {0, 0};
|
||||
|
||||
static uma_zone_t atm_stackq_zone;
|
||||
|
||||
static atm_init_fn atm_init_fns[] = {
|
||||
&atm_sock_init,
|
||||
&atm_cm_init,
|
||||
&atm_aal5_init,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize ATM kernel
|
||||
*
|
||||
@ -112,6 +119,8 @@ static uma_zone_t atm_stackq_zone;
|
||||
void
|
||||
atm_initialize()
|
||||
{
|
||||
u_int i;
|
||||
|
||||
/*
|
||||
* Never called from interrupts, so no locking needed
|
||||
*/
|
||||
@ -141,10 +150,8 @@ atm_initialize()
|
||||
/*
|
||||
* Initialize subsystems
|
||||
*/
|
||||
atm_sock_init();
|
||||
atm_cm_init();
|
||||
atm_aal5_init();
|
||||
|
||||
for (i = 0; i < sizeof(atm_init_fns) / sizeof(atm_init_fn); i++)
|
||||
atm_init_fns[i]();
|
||||
/*
|
||||
* Prime the timer
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user