| 830 | } |
| 831 | |
| 832 | int init_b2bl_htable(void) |
| 833 | { |
| 834 | int i; |
| 835 | b2bl_htable = (b2bl_table_t)shm_malloc(b2bl_hsize* sizeof(b2bl_entry_t)); |
| 836 | if(!b2bl_htable) |
| 837 | ERR_MEM(SHARE_MEM); |
| 838 | |
| 839 | memset(b2bl_htable, 0, b2bl_hsize* sizeof(b2bl_entry_t)); |
| 840 | for(i= 0; i< b2bl_hsize; i++) |
| 841 | { |
| 842 | lock_init(&b2bl_htable[i].lock); |
| 843 | b2bl_htable[i].first = NULL; |
| 844 | } |
| 845 | |
| 846 | return 0; |
| 847 | error: |
| 848 | return -1; |
| 849 | } |
| 850 | |
| 851 | void destroy_b2bl_htable(void) |
| 852 | { |
no test coverage detected