| 2792 | } |
| 2793 | |
| 2794 | void* thread5(void* pParam) |
| 2795 | { |
| 2796 | ErasureCodeShec* shec = (ErasureCodeShec*) pParam; |
| 2797 | |
| 2798 | bufferlist in; |
| 2799 | in.append("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"//length = 62 |
| 2800 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"//124 |
| 2801 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"//186 |
| 2802 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"//248 |
| 2803 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"//310 |
| 2804 | ); |
| 2805 | set<int> want_to_encode; |
| 2806 | for (unsigned int i = 0; i < shec->get_chunk_count(); ++i) { |
| 2807 | want_to_encode.insert(i); |
| 2808 | } |
| 2809 | map<int, bufferlist> encoded; |
| 2810 | shec->encode(want_to_encode, in, &encoded); |
| 2811 | |
| 2812 | int want_to_decode[] = { 0, 1, 2, 3, 4, 5 }; |
| 2813 | map<int, bufferlist> decoded; |
| 2814 | |
| 2815 | printf("*** thread loop start ***\n"); |
| 2816 | g_flag = 1; |
| 2817 | while (g_flag == 1) { |
| 2818 | shec->_decode(set<int>(want_to_decode, want_to_decode + 2), encoded, |
| 2819 | &decoded); |
| 2820 | decoded.clear(); |
| 2821 | } |
| 2822 | printf("*** thread loop end ***\n"); |
| 2823 | |
| 2824 | return NULL; |
| 2825 | } |
| 2826 | END_IGNORE_DEPRECATED |