* per-child initialization */
| 708 | * per-child initialization |
| 709 | */ |
| 710 | int init_child(int rank) |
| 711 | { |
| 712 | char* type; |
| 713 | int rc; |
| 714 | |
| 715 | type = 0; |
| 716 | |
| 717 | switch(rank) { |
| 718 | case PROC_MAIN: type = "PROC_MAIN"; break; |
| 719 | case PROC_TIMER: type = "PROC_TIMER"; break; |
| 720 | case PROC_MODULE: type = "PROC_MODULE"; break; |
| 721 | case PROC_TCP_MAIN: type = "PROC_TCP_MAIN"; break; |
| 722 | } |
| 723 | |
| 724 | if (!type) { |
| 725 | if (rank>0) |
| 726 | type = "CHILD"; |
| 727 | else |
| 728 | type = "UNKNOWN"; |
| 729 | } |
| 730 | |
| 731 | rc = init_mod_child(modules, rank, type, 0); |
| 732 | ready_time = time(NULL); |
| 733 | ready_delay = ready_time - startup_time; |
| 734 | |
| 735 | return rc; |
| 736 | } |
| 737 | |
| 738 | |
| 739 |
no test coverage detected