Counts the additional the number of processes requested by modules */
| 863 | |
| 864 | /* Counts the additional the number of processes requested by modules */ |
| 865 | int count_module_procs(int flags) |
| 866 | { |
| 867 | struct sr_module *m; |
| 868 | unsigned int cnt; |
| 869 | unsigned int n; |
| 870 | |
| 871 | for( m=modules,cnt=0 ; m ; m=m->next) { |
| 872 | if (m->exports->procs==NULL) |
| 873 | continue; |
| 874 | for ( n=0 ; m->exports->procs[n].name ; n++) { |
| 875 | if (!m->exports->procs[n].no || !m->exports->procs[n].function) |
| 876 | continue; |
| 877 | |
| 878 | if (!flags || (m->exports->procs[n].flags & flags)) |
| 879 | cnt+=m->exports->procs[n].no; |
| 880 | } |
| 881 | } |
| 882 | LM_DBG("modules require %d extra processes\n",cnt); |
| 883 | return cnt; |
| 884 | } |
| 885 | |
| 886 | |
| 887 | int start_module_procs(void) |
no outgoing calls
no test coverage detected